testtext

package
v1.8.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (

	// ASCII is an ASCII string containing all letters in the English alphabet.
	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 is a snippet from http://creativecommons.org/licenses/by-sa/3.0/vn/
	Vietnamese = `` /* 812-byte string literal not displayed */

	// Russian is a snippet from http://creativecommons.org/licenses/by-sa/1.0/deed.ru
	Russian = `` /* 617-byte string literal not displayed */

	// Greek is a snippet from http://creativecommons.org/licenses/by-sa/3.0/gr/
	Greek = `` /* 750-byte string literal not displayed */

	// Arabic is a snippet from http://creativecommons.org/licenses/by-sa/3.0/deed.ar
	Arabic = `` /* 569-byte string literal not displayed */

	// Hebrew is a snippet from http://creativecommons.org/licenses/by-sa/1.0/il/
	Hebrew = `` /* 574-byte string literal not displayed */

	TwoByteUTF8 = Russian + Greek + Arabic + Hebrew

	// Thai is a snippet from http://creativecommons.org/licenses/by-sa/3.0/th/
	Thai = `` /* 988-byte string literal not displayed */

	ThreeByteUTF8 = Thai

	// Japanese is a snippet from http://creativecommons.org/licenses/by-sa/2.0/jp/
	Japanese = `` /* 374-byte string literal not displayed */

	// Chinese is a snippet from http://creativecommons.org/licenses/by-sa/2.5/cn/
	Chinese = `` /* 462-byte string literal not displayed */

	// Korean is a snippet from http://creativecommons.org/licenses/by-sa/2.0/kr/
	Korean = `` /* 472-byte string literal not displayed */

	CJK = Chinese + Japanese + Korean

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

Variables

This section is empty.

Functions

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 "github.com/gogf/gf/third/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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL