go/src/slices/slices_test.go

var equalIntTests

var equalFloatTests

func TestEqual(t *testing.T) {}

// equal is simply ==.
func equal[T comparable](v1, v2 T) bool {}

// equalNaN is like == except that all NaNs are equal.
func equalNaN[T comparable](v1, v2 T) bool {}

// offByOne returns true if integers v1 and v2 differ by 1.
func offByOne(v1, v2 int) bool {}

func TestEqualFunc(t *testing.T) {}

func BenchmarkEqualFunc_Large(b *testing.B) {}

var compareIntTests

var compareFloatTests

func TestCompare(t *testing.T) {}

func equalToCmp[T comparable](eq func(T, T) bool) func(T, T) int {}

func TestCompareFunc(t *testing.T) {}

var indexTests

func TestIndex(t *testing.T) {}

func equalToIndex[T any](f func(T, T) bool, v1 T) func(T) bool {}

func BenchmarkIndex_Large(b *testing.B) {}

func TestIndexFunc(t *testing.T) {}

func BenchmarkIndexFunc_Large(b *testing.B) {}

func TestContains(t *testing.T) {}

func TestContainsFunc(t *testing.T) {}

var insertTests

func TestInsert(t *testing.T) {}

func TestInsertOverlap(t *testing.T) {}

func TestInsertPanics(t *testing.T) {}

var deleteTests

func TestDelete(t *testing.T) {}

var deleteFuncTests

func TestDeleteFunc(t *testing.T) {}

func panics(f func()) (b bool) {}

func TestDeletePanics(t *testing.T) {}

func TestDeleteClearTail(t *testing.T) {}

func TestDeleteFuncClearTail(t *testing.T) {}

func TestClone(t *testing.T) {}

var compactTests

func TestCompact(t *testing.T) {}

func BenchmarkCompact(b *testing.B) {}

func BenchmarkCompact_Large(b *testing.B) {}

func TestCompactFunc(t *testing.T) {}

func TestCompactClearTail(t *testing.T) {}

func TestCompactFuncClearTail(t *testing.T) {}

func BenchmarkCompactFunc(b *testing.B) {}

func BenchmarkCompactFunc_Large(b *testing.B) {}

func TestGrow(t *testing.T) {}

func TestClip(t *testing.T) {}

func TestReverse(t *testing.T) {}

// naiveReplace is a baseline implementation to the Replace function.
func naiveReplace[S ~[]E, E any](s S, i, j int, v ...E) S {}

func TestReplace(t *testing.T) {}

func TestReplacePanics(t *testing.T) {}

func TestReplaceGrow(t *testing.T) {}

func TestReplaceClearTail(t *testing.T) {}

func TestReplaceOverlap(t *testing.T) {}

func TestReplaceEndClearTail(t *testing.T) {}

func BenchmarkReplace(b *testing.B) {}

func TestInsertGrowthRate(t *testing.T) {}

func TestReplaceGrowthRate(t *testing.T) {}

func apply[T any](v T, f func(T)) {}

// Test type inference with a named slice type.
func TestInference(t *testing.T) {}

func TestConcat(t *testing.T) {}

func TestConcat_too_large(t *testing.T) {}

func TestRepeat(t *testing.T) {}

func TestRepeatPanics(t *testing.T) {}

func TestIssue68488(t *testing.T) {}