go/src/runtime/map_test.go

// negative zero is a good test because:
//  1. 0 and -0 are equal, yet have distinct representations.
//  2. 0 is represented as all zeros, -0 isn't.
//
// I'm not sure the language spec actually requires this behavior,
// but it's what the current map implementation does.
func TestNegativeZero(t *testing.T) {}

func testMapNan(t *testing.T, m map[float64]int) {}

// nan is a good test because nan != nan, and nan has
// a randomized hash value.
func TestMapAssignmentNan(t *testing.T) {}

// nan is a good test because nan != nan, and nan has
// a randomized hash value.
func TestMapOperatorAssignmentNan(t *testing.T) {}

func TestMapOperatorAssignment(t *testing.T) {}

var sinkAppend

func TestMapAppendAssignment(t *testing.T) {}

// Maps aren't actually copied on assignment.
func TestAlias(t *testing.T) {}

func TestGrowWithNaN(t *testing.T) {}

type FloatInt

func TestGrowWithNegativeZero(t *testing.T) {}

func TestIterGrowAndDelete(t *testing.T) {}

// make sure old bucket arrays don't get GCd while
// an iterator is still using them.
func TestIterGrowWithGC(t *testing.T) {}

func testConcurrentReadsAfterGrowth(t *testing.T, useReflect bool) {}

func TestConcurrentReadsAfterGrowth(t *testing.T) {}

func TestConcurrentReadsAfterGrowthReflect(t *testing.T) {}

func TestBigItems(t *testing.T) {}

func TestMapHugeZero(t *testing.T) {}

type empty

func TestEmptyKeyAndValue(t *testing.T) {}

// Tests a map with a single bucket, with same-lengthed short keys
// ("quick keys") as well as long keys.
func TestSingleBucketMapStringKeys_DupLen(t *testing.T) {}

// Tests a map with a single bucket, with all keys having different lengths.
func TestSingleBucketMapStringKeys_NoDupLen(t *testing.T) {}

func testMapLookups(t *testing.T, m map[string]string) {}

// Tests whether the iterator returns the right elements when
// started in the middle of a grow, when the keys are NaNs.
func TestMapNanGrowIterator(t *testing.T) {}

// Issue 8410
func TestMapSparseIterOrder(t *testing.T) {}

func TestMapStringBytesLookup(t *testing.T) {}

func TestMapLargeKeyNoPointer(t *testing.T) {}

func TestMapLargeValNoPointer(t *testing.T) {}

// Test that making a map with a large or invalid hint
// doesn't panic. (Issue 19926).
func TestIgnoreBogusMapHint(t *testing.T) {}

var testNonEscapingMapVariable

func TestNonEscapingMap(t *testing.T) {}

func TestDeferDeleteSlow(t *testing.T) {}

// TestIncrementAfterDeleteValueInt and other test Issue 25936.
// Value types int, int32, int64 are affected. Value type string
// works as expected.
func TestIncrementAfterDeleteValueInt(t *testing.T) {}

func TestIncrementAfterDeleteValueInt32(t *testing.T) {}

func TestIncrementAfterDeleteValueInt64(t *testing.T) {}

func TestIncrementAfterDeleteKeyStringValueInt(t *testing.T) {}

func TestIncrementAfterDeleteKeyValueString(t *testing.T) {}

// TestIncrementAfterBulkClearKeyStringValueInt tests that map bulk
// deletion (mapclear) still works as expected. Note that it was not
// affected by Issue 25936.
func TestIncrementAfterBulkClearKeyStringValueInt(t *testing.T) {}

func TestMapTombstones(t *testing.T) {}

type canString

func (c canString) String() string {}

func TestMapInterfaceKey(t *testing.T) {}

type panicStructKey

func (p panicStructKey) String() string {}

type structKey

func (structKey) String() string {}

func TestEmptyMapWithInterfaceKey(t *testing.T) {}

func TestMapKeys(t *testing.T) {}

func TestMapValues(t *testing.T) {}

func computeHash() uintptr {}

func subprocessHash(t *testing.T, env string) uintptr {}

// memhash has unique per-process seeds, so hashes should differ across
// processes.
//
// Regression test for https://go.dev/issue/66885.
func TestMemHashGlobalSeed(t *testing.T) {}

func TestMapIterDeleteReplace(t *testing.T) {}