1
2
3
4
5 package sys
6
7 import (
8 "testing"
9 )
10
11 func TestArchInFamily(t *testing.T) {
12 if got, want := ArchPPC64LE.InFamily(AMD64), false; got != want {
13 t.Errorf("Got ArchPPC64LE.InFamily(AMD64) = %v, want %v", got, want)
14 }
15 if got, want := ArchPPC64LE.InFamily(PPC64), true; got != want {
16 t.Errorf("Got ArchPPC64LE.InFamily(PPC64) = %v, want %v", got, want)
17 }
18 if got, want := ArchPPC64LE.InFamily(AMD64, RISCV64), false; got != want {
19 t.Errorf("Got ArchPPC64LE.InFamily(AMD64, RISCV64) = %v, want %v", got, want)
20 }
21 if got, want := ArchPPC64LE.InFamily(AMD64, PPC64), true; got != want {
22 t.Errorf("Got ArchPPC64LE.InFamily(AMD64, PPC64) = %v, want %v", got, want)
23 }
24 }
25
View as plain text