| 1 |
// Copyright 2024 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 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 |
} |