Versions in this module Expand all Collapse all v1 v1.2.0 Dec 27, 2021 Changes in this version + const Digits + const Lower + const Upper + var DebugTLE = 2 * time.Second + var DisableLogInput bool + var Once bool + func AssertEqual(t *testing.T, rawText string, runFunc ioFunc) + func AssertEqualCase(t *testing.T, rawText string, targetCaseNum int, runFunc ioFunc) + func AssertEqualFileCase(t *testing.T, dir string, targetCaseNum int, runFunc ioFunc) + func AssertEqualFileCaseWithName(t *testing.T, dir, inName, ansName string, targetCaseNum int, runFunc ioFunc) + func AssertEqualRunResults(t *testing.T, inputs []string, targetCaseNum int, runFuncAC, runFunc ioFunc) + func AssertEqualRunResultsInf(t *testing.T, inputGenerator func() string, runFuncAC, runFunc ioFunc) + func AssertEqualStringCase(t *testing.T, testCases [][2]string, targetCaseNum int, runFunc ioFunc) + func CheckRunResultsInf(t *testing.T, inputGenerator func() (string, OutputChecker), runFunc ioFunc) + func CheckRunResultsInfWithTarget(t *testing.T, inputGenerator func() (string, OutputChecker), targetCaseNum int, ...) + type OutputChecker func(string) bool + type RG struct + func NewRandGenerator() *RG + func NewRandGeneratorWithSeed(seed int64) *RG + func (r *RG) BinaryTree(n, st int) (children [][2]int) + func (r *RG) Byte(b byte) + func (r *RG) Bytes(s string) + func (r *RG) Float(min, max float64, precision int) float64 + func (r *RG) FloatSlice(size int, min, max float64, precision int) []float64 + func (r *RG) GraphEdges(n, m, st int, directed bool) (edges [][2]int) + func (r *RG) GraphHackSPFA(n, row, st, minWeight, maxWeight int) (edges [][3]int) + func (r *RG) GraphWeightedEdges(n, m, st, minWeight, maxWeight int, directed bool) (edges [][3]int) + func (r *RG) Int(min, max int) int + func (r *RG) IntMatrix(row, col int, min, max int) [][]int + func (r *RG) IntOnly(min, max int) int + func (r *RG) IntSlice(size int, min, max int) []int + func (r *RG) IntSliceOrdered(size int, min, max int, inc, unique bool) []int + func (r *RG) NewLine() + func (r *RG) One() + func (r *RG) Permutation(min, max int) []int + func (r *RG) Space() + func (r *RG) Str(minLen, maxLen int, min, max byte) string + func (r *RG) StrInSet(minLen, maxLen int, chars string) string + func (r *RG) String() string + func (r *RG) TreeEdges(n, st int) (edges [][2]int) + func (r *RG) TreeWeightedEdges(n, st, minWeight, maxWeight int) (edges [][3]int) + func (r *RG) UniquePoints(n, minX, maxX, minY, maxY int) (points [][2]int) + func (r *RG) UniqueSlice(size int, min, max int) []int