go/src/runtime/hash_test.go

func TestMemHash32Equality(t *testing.T) {}

func TestMemHash64Equality(t *testing.T) {}

// Sanity checks.
// hash should not depend on values outside key.
// hash should not depend on alignment.
func TestSmhasherSanity(t *testing.T) {}

type HashSet

func newHashSet() *HashSet {}

func (s *HashSet) add(h uintptr) {}

func (s *HashSet) addS(x string) {}

func (s *HashSet) addB(x []byte) {}

func (s *HashSet) addS_seed(x string, seed uintptr) {}

func (s *HashSet) check(t *testing.T) {}

// a string plus adding zeros must make distinct hashes
func TestSmhasherAppendedZeros(t *testing.T) {}

// All 0-3 byte strings have distinct hashes.
func TestSmhasherSmallKeys(t *testing.T) {}

// Different length strings of all zeros have distinct hashes.
func TestSmhasherZeros(t *testing.T) {}

// Strings with up to two nonzero bytes all have distinct hashes.
func TestSmhasherTwoNonzero(t *testing.T) {}

func twoNonZero(h *HashSet, n int) {}

// Test strings with repeats, like "abcdabcdabcdabcd..."
func TestSmhasherCyclic(t *testing.T) {}

// Test strings with only a few bits set
func TestSmhasherSparse(t *testing.T) {}

func sparse(t *testing.T, h *HashSet, n int, k int) {}

// set up to k bits at index i and greater
func setbits(h *HashSet, b []byte, i int, k int) {}

// Test all possible combinations of n blocks from the set s.
// "permutation" is a bad name here, but it is what Smhasher uses.
func TestSmhasherPermutation(t *testing.T) {}

func permutation(t *testing.T, h *HashSet, s []uint32, n int) {}

func genPerm(h *HashSet, b []byte, s []uint32, n int) {}

type Key

type BytesKey

func (k *BytesKey) clear() {}

func (k *BytesKey) random(r *rand.Rand) {}

func (k *BytesKey) bits() int {}

func (k *BytesKey) flipBit(i int) {}

func (k *BytesKey) hash() uintptr {}

func (k *BytesKey) name() string {}

type Int32Key

func (k *Int32Key) clear() {}

func (k *Int32Key) random(r *rand.Rand) {}

func (k *Int32Key) bits() int {}

func (k *Int32Key) flipBit(i int) {}

func (k *Int32Key) hash() uintptr {}

func (k *Int32Key) name() string {}

type Int64Key

func (k *Int64Key) clear() {}

func (k *Int64Key) random(r *rand.Rand) {}

func (k *Int64Key) bits() int {}

func (k *Int64Key) flipBit(i int) {}

func (k *Int64Key) hash() uintptr {}

func (k *Int64Key) name() string {}

type EfaceKey

func (k *EfaceKey) clear() {}

func (k *EfaceKey) random(r *rand.Rand) {}

func (k *EfaceKey) bits() int {}

func (k *EfaceKey) flipBit(i int) {}

func (k *EfaceKey) hash() uintptr {}

func (k *EfaceKey) name() string {}

type IfaceKey

type fInter

func (x fInter) F() {}

func (k *IfaceKey) clear() {}

func (k *IfaceKey) random(r *rand.Rand) {}

func (k *IfaceKey) bits() int {}

func (k *IfaceKey) flipBit(i int) {}

func (k *IfaceKey) hash() uintptr {}

func (k *IfaceKey) name() string {}

// Flipping a single bit of a key should flip each output bit with 50% probability.
func TestSmhasherAvalanche(t *testing.T) {}

func avalancheTest1(t *testing.T, k Key) {}

// All bit rotations of a set of distinct keys
func TestSmhasherWindowed(t *testing.T) {}

func windowed(t *testing.T, h *HashSet, k Key) {}

// All keys of the form prefix + [A-Za-z0-9]*N + suffix.
func TestSmhasherText(t *testing.T) {}

func text(t *testing.T, h *HashSet, prefix, suffix string) {}

// Make sure different seed values generate different hashes.
func TestSmhasherSeed(t *testing.T) {}

func TestIssue66841(t *testing.T) {}

const hashSize

func randBytes(r *rand.Rand, b []byte) {}

func benchmarkHash(b *testing.B, n int) {}

func BenchmarkHash5(b *testing.B)     {}

func BenchmarkHash16(b *testing.B)    {}

func BenchmarkHash64(b *testing.B)    {}

func BenchmarkHash1024(b *testing.B)  {}

func BenchmarkHash65536(b *testing.B) {}

func TestArrayHash(t *testing.T) {}

func TestStructHash(t *testing.T) {}

var sink

func BenchmarkAlignedLoad(b *testing.B) {}

func BenchmarkUnalignedLoad(b *testing.B) {}

func TestCollisions(t *testing.T) {}