Source file
src/runtime/syscall_unix_test.go
1
2
3
4
5
6
7 package runtime_test
8
9 import (
10 "runtime"
11 "syscall"
12 "testing"
13 )
14
15 func TestSyscallFlagAlignment(t *testing.T) {
16
17 check := func(name string, got, want int) {
18 if got != want {
19 t.Errorf("flag %s does not line up: got %d, want %d", name, got, want)
20 }
21 }
22 check("O_WRONLY", runtime.O_WRONLY, syscall.O_WRONLY)
23 check("O_CREAT", runtime.O_CREAT, syscall.O_CREAT)
24 check("O_TRUNC", runtime.O_TRUNC, syscall.O_TRUNC)
25 }
26
View as plain text