1 // Copyright 2022 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
15 func TestSyscallFlagAlignment(t *testing.T) {
16 // TODO(mknyszek): Check other flags.
17 check := func(name string, got, want int) {
19 t.Errorf("flag %s does not line up: got %d, want %d", name, got, want)
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)