go/src/strings/replace_test.go

var htmlEscaper

var htmlUnescaper

// The http package's old HTML escaping function.
func oldHTMLEscape(s string) string {}

var capitalLetters

// TestReplacer tests the replacer implementations.
func TestReplacer(t *testing.T) {}

var algorithmTestCases

// TestPickAlgorithm tests that NewReplacer picks the correct algorithm.
func TestPickAlgorithm(t *testing.T) {}

type errWriter

func (errWriter) Write(p []byte) (n int, err error) {}

// TestWriteStringError tests that WriteString returns an error
// received from the underlying io.Writer.
func TestWriteStringError(t *testing.T) {}

// TestGenericTrieBuilding verifies the structure of the generated trie. There
// is one node per line, and the key ending with the current line is in the
// trie if it ends with a "+".
func TestGenericTrieBuilding(t *testing.T) {}

func BenchmarkGenericNoMatch(b *testing.B) {}

func BenchmarkGenericMatch1(b *testing.B) {}

func BenchmarkGenericMatch2(b *testing.B) {}

func benchmarkSingleString(b *testing.B, pattern, text string) {}

func BenchmarkSingleMaxSkipping(b *testing.B) {}

func BenchmarkSingleLongSuffixFail(b *testing.B) {}

func BenchmarkSingleMatch(b *testing.B) {}

func BenchmarkByteByteNoMatch(b *testing.B) {}

func BenchmarkByteByteMatch(b *testing.B) {}

func BenchmarkByteStringMatch(b *testing.B) {}

func BenchmarkHTMLEscapeNew(b *testing.B) {}

func BenchmarkHTMLEscapeOld(b *testing.B) {}

func BenchmarkByteStringReplacerWriteString(b *testing.B) {}

func BenchmarkByteReplacerWriteString(b *testing.B) {}

// BenchmarkByteByteReplaces compares byteByteImpl against multiple Replaces.
func BenchmarkByteByteReplaces(b *testing.B) {}

// BenchmarkByteByteMap compares byteByteImpl against Map.
func BenchmarkByteByteMap(b *testing.B) {}

var mapdata

func BenchmarkMap(b *testing.B) {}