-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharch_test.go
24 lines (21 loc) · 830 Bytes
/
arch_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright 2024 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 sys
import (
"testing"
)
func TestArchInFamily(t *testing.T) {
if got, want := ArchPPC64LE.InFamily(AMD64), false; got != want {
t.Errorf("Got ArchPPC64LE.InFamily(AMD64) = %v, want %v", got, want)
}
if got, want := ArchPPC64LE.InFamily(PPC64), true; got != want {
t.Errorf("Got ArchPPC64LE.InFamily(PPC64) = %v, want %v", got, want)
}
if got, want := ArchPPC64LE.InFamily(AMD64, RISCV64), false; got != want {
t.Errorf("Got ArchPPC64LE.InFamily(AMD64, RISCV64) = %v, want %v", got, want)
}
if got, want := ArchPPC64LE.InFamily(AMD64, PPC64), true; got != want {
t.Errorf("Got ArchPPC64LE.InFamily(AMD64, PPC64) = %v, want %v", got, want)
}
}