go/src/bytes/bytes_test.go

func sliceOfString(s [][]byte) []string {}

func collect(t *testing.T, seq iter.Seq[[]byte]) [][]byte {}

type LinesTest

var linesTests

func TestLines(t *testing.T) {}

var abcd

var faces

var commas

var dots

type BinOpTest

func TestEqual(t *testing.T) {}

func TestEqualExhaustive(t *testing.T) {}

// make sure Equal returns false for minimally different strings. The data
// is all zeros except for a single one in one location.
func TestNotEqual(t *testing.T) {}

var indexTests

var lastIndexTests

var indexAnyTests

var lastIndexAnyTests

// Execute f on each test case.  funcName should be the name of f; it's used
// in failure reports.
func runIndexTests(t *testing.T, f func(s, sep []byte) int, funcName string, testCases []BinOpTest) {}

func runIndexAnyTests(t *testing.T, f func(s []byte, chars string) int, funcName string, testCases []BinOpTest) {}

func TestIndex(t *testing.T)     {}

func TestLastIndex(t *testing.T) {}

func TestIndexAny(t *testing.T)  {}

func TestLastIndexAny(t *testing.T) {}

func TestIndexByte(t *testing.T) {}

func TestLastIndexByte(t *testing.T) {}

// test a larger buffer with different sizes and alignments
func TestIndexByteBig(t *testing.T) {}

// test a small index across all page offsets
func TestIndexByteSmall(t *testing.T) {}

func TestIndexRune(t *testing.T) {}

// test count of a single byte across page offsets
func TestCountByte(t *testing.T) {}

// Make sure we don't count bytes outside our window
func TestCountByteNoMatch(t *testing.T) {}

var bmbuf

func valName(x int) string {}

func benchBytes(b *testing.B, sizes []int, f func(b *testing.B, n int)) {}

var indexSizes

var isRaceBuilder

func BenchmarkIndexByte(b *testing.B) {}

func BenchmarkIndexBytePortable(b *testing.B) {}

func bmIndexByte(index func([]byte, byte) int) func(b *testing.B, n int) {}

func BenchmarkIndexRune(b *testing.B) {}

func BenchmarkIndexRuneASCII(b *testing.B) {}

func BenchmarkIndexRuneUnicode(b *testing.B) {}

func bmIndexRuneASCII(index func([]byte, rune) int) func(b *testing.B, n int) {}

func bmIndexRune(index func([]byte, rune) int) func(b *testing.B, n int) {}

func bmIndexRuneUnicode(rt *unicode.RangeTable, needle rune) func(b *testing.B, n int) {}

func BenchmarkEqual(b *testing.B) {}

func bmEqual(equal func([]byte, []byte) bool) func(b *testing.B, n int) {}

func BenchmarkEqualBothUnaligned(b *testing.B) {}

func BenchmarkIndex(b *testing.B) {}

func BenchmarkIndexEasy(b *testing.B) {}

func BenchmarkCount(b *testing.B) {}

func BenchmarkCountEasy(b *testing.B) {}

func BenchmarkCountSingle(b *testing.B) {}

type SplitTest

var splittests

func TestSplit(t *testing.T) {}

var splitaftertests

func TestSplitAfter(t *testing.T) {}

type FieldsTest

var fieldstests

func TestFields(t *testing.T) {}

func TestFieldsFunc(t *testing.T) {}

type StringTest

var upperTests

var lowerTests

const space

var trimSpaceTests

// Execute f on each test case.  funcName should be the name of f; it's used
// in failure reports.
func runStringTests(t *testing.T, f func([]byte) []byte, funcName string, testCases []StringTest) {}

func tenRunes(r rune) string {}

// User-defined self-inverse mapping function
func rot13(r rune) rune {}

func TestMap(t *testing.T) {}

func TestToUpper(t *testing.T) {}

func TestToLower(t *testing.T) {}

func BenchmarkToUpper(b *testing.B) {}

func BenchmarkToLower(b *testing.B) {}

var toValidUTF8Tests

func TestToValidUTF8(t *testing.T) {}

func TestTrimSpace(t *testing.T) {}

type RepeatTest

var longString

var RepeatTests

func TestRepeat(t *testing.T) {}

func repeat(b []byte, count int) (err error) {}

// See Issue golang.org/issue/16237
func TestRepeatCatchesOverflow(t *testing.T) {}

type RunesTest

var RunesTests

func TestRunes(t *testing.T) {}

type TrimTest

var trimTests

type TrimNilTest

var trimNilTests

func TestTrim(t *testing.T) {}

type predicate

var isSpace

var isDigit

var isUpper

var isValidRune

type TrimFuncTest

func not(p predicate) predicate {}

var trimFuncTests

func TestTrimFunc(t *testing.T) {}

type IndexFuncTest

var indexFuncTests

func TestIndexFunc(t *testing.T) {}

type ReplaceTest

var ReplaceTests

func TestReplace(t *testing.T) {}

type TitleTest

var TitleTests

func TestTitle(t *testing.T) {}

var ToTitleTests

func TestToTitle(t *testing.T) {}

var EqualFoldTests

func TestEqualFold(t *testing.T) {}

var cutTests

func TestCut(t *testing.T) {}

var cutPrefixTests

func TestCutPrefix(t *testing.T) {}

var cutSuffixTests

func TestCutSuffix(t *testing.T) {}

func TestBufferGrowNegative(t *testing.T) {}

func TestBufferTruncateNegative(t *testing.T) {}

func TestBufferTruncateOutOfRange(t *testing.T) {}

var containsTests

func TestContains(t *testing.T) {}

var ContainsAnyTests

func TestContainsAny(t *testing.T) {}

var ContainsRuneTests

func TestContainsRune(t *testing.T) {}

func TestContainsFunc(t *testing.T) {}

var makeFieldsInput

var makeFieldsInputASCII

var bytesdata

func BenchmarkFields(b *testing.B) {}

func BenchmarkFieldsFunc(b *testing.B) {}

func BenchmarkTrimSpace(b *testing.B) {}

func BenchmarkToValidUTF8(b *testing.B) {}

func makeBenchInputHard() []byte {}

var benchInputHard

func benchmarkIndexHard(b *testing.B, sep []byte) {}

func benchmarkLastIndexHard(b *testing.B, sep []byte) {}

func benchmarkCountHard(b *testing.B, sep []byte) {}

func BenchmarkIndexHard1(b *testing.B) {}

func BenchmarkIndexHard2(b *testing.B) {}

func BenchmarkIndexHard3(b *testing.B) {}

func BenchmarkIndexHard4(b *testing.B) {}

func BenchmarkLastIndexHard1(b *testing.B) {}

func BenchmarkLastIndexHard2(b *testing.B) {}

func BenchmarkLastIndexHard3(b *testing.B) {}

func BenchmarkCountHard1(b *testing.B) {}

func BenchmarkCountHard2(b *testing.B) {}

func BenchmarkCountHard3(b *testing.B) {}

func BenchmarkSplitEmptySeparator(b *testing.B) {}

func BenchmarkSplitSingleByteSeparator(b *testing.B) {}

func BenchmarkSplitMultiByteSeparator(b *testing.B) {}

func BenchmarkSplitNSingleByteSeparator(b *testing.B) {}

func BenchmarkSplitNMultiByteSeparator(b *testing.B) {}

func BenchmarkRepeat(b *testing.B) {}

func BenchmarkRepeatLarge(b *testing.B) {}

func BenchmarkBytesCompare(b *testing.B) {}

func BenchmarkIndexAnyASCII(b *testing.B) {}

func BenchmarkIndexAnyUTF8(b *testing.B) {}

func BenchmarkLastIndexAnyASCII(b *testing.B) {}

func BenchmarkLastIndexAnyUTF8(b *testing.B) {}

func BenchmarkTrimASCII(b *testing.B) {}

func BenchmarkTrimByte(b *testing.B) {}

func BenchmarkIndexPeriodic(b *testing.B) {}

func TestClone(t *testing.T) {}