File: ioctl_test.go

package info (click to toggle)
golang-github-dennwc-ioctl 1.0.0%2Bgit20181021.0178042-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 64 kB
  • sloc: makefile: 2
file content (21 lines) | stat: -rw-r--r-- 341 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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)
		}
	}
}