Debian Codegraph @

src/runtime/cpuflags_amd64_test.go

raw
1 // Copyright 2025 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.
4
5 package runtime_test
6
7 import (
8 "runtime"
9 "testing"
10 )
11
12 func TestHasAVX(t *testing.T) {
13 t.Parallel()
14 output := runTestProg(t, "testprog", "CheckAVX")
15 ok := output == "OK\n"
16 if *runtime.X86HasAVX != ok {
17 t.Fatalf("x86HasAVX: %v, CheckAVX got:\n%s", *runtime.X86HasAVX, output)
18 }
19 }