mirror of
https://github.com/dennwc/btrfs
synced 2025-02-08 23:56:54 +00:00
22 lines
341 B
Go
22 lines
341 B
Go
package ioctl
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
var casesIOC = []struct {
|
|
got uintptr
|
|
expect uintptr
|
|
}{
|
|
{got: IOC(1, 2, 3, 4), expect: 0x40040203},
|
|
}
|
|
|
|
func TestIOC(t *testing.T) {
|
|
for i, c := range casesIOC {
|
|
if c.got != c.expect {
|
|
t.Errorf("unexpected ioc (case %d): %x(%b) vs %x(%b)",
|
|
i+1, c.got, c.got, c.expect, c.expect)
|
|
}
|
|
}
|
|
}
|