textgolang.org/x/text/internal/testtext Index | Files

package testtext

import "golang.org/x/text/internal/testtext"

Package testtext contains test data that is of common use to the text repository.

Index

Constants

const (
	ASCII = "The quick brown fox jumps over the lazy dog. " +
		"The quick brown fox jumps over the lazy dog. " +
		"The quick brown fox jumps over the lazy dog. " +
		"The quick brown fox jumps over the lazy dog. " +
		"The quick brown fox jumps over the lazy dog. " +
		"The quick brown fox jumps over the lazy dog. " +
		"The quick brown fox jumps over the lazy dog. " +
		"The quick brown fox jumps over the lazy dog. " +
		"The quick brown fox jumps over the lazy dog. " +
		"The quick brown fox jumps over the lazy dog. "

	Vietnamese = "" /* 814 byte string literal not displayed */

	Russian = "" /* 619 byte string literal not displayed */

	Greek = "" /* 752 byte string literal not displayed */

	Arabic = "" /* 571 byte string literal not displayed */

	Hebrew = "" /* 576 byte string literal not displayed */

	TwoByteUTF8 = Russian + Greek + Arabic + Hebrew

	Thai = "" /* 990 byte string literal not displayed */

	ThreeByteUTF8 = Thai

	Japanese = "" /* 376 byte string literal not displayed */

	Chinese = "" /* 464 byte string literal not displayed */

	Korean = "" /* 474 byte string literal not displayed */

	CJK = Chinese + Japanese + Korean

	All = ASCII + Vietnamese + TwoByteUTF8 + ThreeByteUTF8 + CJK
)

Functions

func AllocsPerRun

func AllocsPerRun(runs int, f func()) (avg float64)

AllocsPerRun wraps testing.AllocsPerRun.

func CodeSize

func CodeSize(s string) (int, error)

CodeSize builds the given code sample and returns the binary size or en error if an error occurred. The code sample typically will look like this:

package main
import "golang.org/x/text/somepackage"
func main() {
    somepackage.Func() // reference Func to cause it to be linked in.
}

See dict_test.go in the display package for an example.

func SkipIfNotLong

func SkipIfNotLong(t *testing.T)

SkipIfNotLong returns whether long tests should be performed.

Source Files

codesize.go flag.go gc.go text.go

Version
v0.22.0 (latest)
Published
Feb 4, 2025
Platform
linux/amd64
Imports
9 packages
Last checked
1 day ago

Tools for package owners.