diff options
Diffstat (limited to 'src/runtime/cpuflags_amd64_test.go')
| -rw-r--r-- | src/runtime/cpuflags_amd64_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/runtime/cpuflags_amd64_test.go b/src/runtime/cpuflags_amd64_test.go new file mode 100644 index 0000000000..f238e7fdf2 --- /dev/null +++ b/src/runtime/cpuflags_amd64_test.go @@ -0,0 +1,19 @@ +// Copyright 2025 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package runtime_test + +import ( + "runtime" + "testing" +) + +func TestHasAVX(t *testing.T) { + t.Parallel() + output := runTestProg(t, "testprog", "CheckAVX") + ok := output == "OK\n" + if *runtime.X86HasAVX != ok { + t.Fatalf("x86HasAVX: %v, CheckAVX got:\n%s", *runtime.X86HasAVX, output) + } +} |
