Back to godoc.org

Package testtext

v0.3.3
Latest Go to latest
Published: Jun 16, 2020 | License: BSD-3-Clause | Module: golang.org/x/text

Overview

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

Index

Package Files

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 = "" /* 812 byte string literal not displayed */

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

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

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

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

	TwoByteUTF8 = Russian + Greek + Arabic + Hebrew

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

	ThreeByteUTF8 = Thai

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

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

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

	CJK = Chinese + Japanese + Korean

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

func AllocsPerRun

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

AllocsPerRun wraps testing.AllocsPerRun.

func Bench

func Bench(b *testing.B, name string, fn func(b *testing.B)) bool

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 Run

func Run(t *testing.T, name string, fn func(t *testing.T)) bool

func SkipIfNotLong

func SkipIfNotLong(t *testing.T)

SkipIfNotLong returns whether long tests should be performed.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier