diff options
Diffstat (limited to 'src/internal/cpu/cpu_test.go')
| -rw-r--r-- | src/internal/cpu/cpu_test.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/internal/cpu/cpu_test.go b/src/internal/cpu/cpu_test.go index ab9836ac2f..07b0243f30 100644 --- a/src/internal/cpu/cpu_test.go +++ b/src/internal/cpu/cpu_test.go @@ -25,3 +25,26 @@ func TestAVX2hasAVX(t *testing.T) { } } } + +func TestPPC64minimalFeatures(t *testing.T) { + if runtime.GOARCH == "ppc64" || runtime.GOARCH == "ppc64le" { + if !cpu.PPC64.IsPOWER8 { + t.Fatalf("IsPOWER8 expected true, got false") + } + if !cpu.PPC64.HasVMX { + t.Fatalf("HasVMX expected true, got false") + } + if !cpu.PPC64.HasDFP { + t.Fatalf("HasDFP expected true, got false") + } + if !cpu.PPC64.HasVSX { + t.Fatalf("HasVSX expected true, got false") + } + if !cpu.PPC64.HasISEL { + t.Fatalf("HasISEL expected true, got false") + } + if !cpu.PPC64.HasVCRYPTO { + t.Fatalf("HasVCRYPTO expected true, got false") + } + } +} |
