summaryrefslogtreecommitdiff
path: root/libgo/go/runtime/hash_test.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2021-07-30 14:28:58 -0700
committerIan Lance Taylor <iant@golang.org>2021-08-12 20:23:07 -0700
commitc5b21c3f4c17b0649155035d2f9aa97b2da8a813 (patch)
treec6d3a68b503ba5b16182acbb958e3e5dbc95a43b /libgo/go/runtime/hash_test.go
parent72be20e20299ec57b4bc9ba03d5b7d6bf10e97cc (diff)
downloadgcc-c5b21c3f4c17b0649155035d2f9aa97b2da8a813.tar.gz
libgo: update to Go1.17rc2
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/341629
Diffstat (limited to 'libgo/go/runtime/hash_test.go')
-rw-r--r--libgo/go/runtime/hash_test.go49
1 files changed, 0 insertions, 49 deletions
diff --git a/libgo/go/runtime/hash_test.go b/libgo/go/runtime/hash_test.go
index 60a86015f64..753b129d82c 100644
--- a/libgo/go/runtime/hash_test.go
+++ b/libgo/go/runtime/hash_test.go
@@ -8,7 +8,6 @@ import (
"fmt"
"math"
"math/rand"
- "reflect"
. "runtime"
"strings"
"testing"
@@ -49,54 +48,6 @@ func TestMemHash64Equality(t *testing.T) {
}
}
-func TestCompilerVsRuntimeHash(t *testing.T) {
- // Test to make sure the compiler's hash function and the runtime's hash function agree.
- // See issue 37716.
- for _, m := range []interface{}{
- map[bool]int{},
- map[int8]int{},
- map[uint8]int{},
- map[int16]int{},
- map[uint16]int{},
- map[int32]int{},
- map[uint32]int{},
- map[int64]int{},
- map[uint64]int{},
- map[int]int{},
- map[uint]int{},
- map[uintptr]int{},
- map[*byte]int{},
- map[chan int]int{},
- map[unsafe.Pointer]int{},
- map[float32]int{},
- map[float64]int{},
- map[complex64]int{},
- map[complex128]int{},
- map[string]int{},
- //map[interface{}]int{},
- //map[interface{F()}]int{},
- map[[8]uint64]int{},
- map[[8]string]int{},
- map[struct{ a, b, c, d int32 }]int{}, // Note: tests AMEM128
- map[struct{ a, b, _, d int32 }]int{},
- map[struct {
- a, b int32
- c float32
- d, e [8]byte
- }]int{},
- map[struct {
- a int16
- b int64
- }]int{},
- } {
- k := reflect.New(reflect.TypeOf(m).Key()).Elem().Interface() // the zero key
- x, y := MapHashCheck(m, k)
- if x != y {
- t.Errorf("hashes did not match (%x vs %x) for map %T", x, y, m)
- }
- }
-}
-
// Smhasher is a torture test for hash functions.
// https://code.google.com/p/smhasher/
// This code is a port of some of the Smhasher tests to Go.