Versions in this module Expand all Collapse all v0 v0.7.0 Sep 4, 2022 Changes in this version + const ErrDurationBadSyntax + const ErrDurationWithoutSuffix type NotValueOfTypeError + Err error + func (e *NotValueOfTypeError) Unwrap() error + type StringWarning string + func (w StringWarning) Error() string v0.6.0 Nov 4, 2021 Changes in this version + const AltLineFeed + const ErrNegativePositiveDuration + const ErrNotAStructLike + const ErrUnknownField + const FINALXM + const FLOATXM + const INTXM + const IODelim + const IOSeparatorMissing + const KeyMissing + const STRXM + const TestDelim + var Au aurora.Aurora + var MaskGenerators = []func(*Lexer, string, string) []bool + var TypeCheckers = []func(string) bool + var ValidIntMaxLen = 10 + func AssertCallCount(t *testing.T, funcName string, got, want int) + func AssertDefaultConfig(t *testing.T, got InputsConfig) + func AssertDiffFailure(t *testing.T, ok bool) + func AssertDiffSuccess(t *testing.T, ok bool) + func AssertEnrichedLexSequence(t *testing.T, got, want []RichText) + func AssertErrors(t *testing.T, got, want []error) + func AssertLexemes(t *testing.T, got, want []string) + func AssertListenerNotified(t *testing.T, listener *SpyPrinter, wantTests []Test) + func AssertNoErrors(t *testing.T, errs []error) + func AssertResultIDInvariant(t *testing.T, b *TestingBatch) + func AssertRichText(t *testing.T, got, want RichText) + func AssertRichTextMask(t *testing.T, got, want []bool) + func AssertTest(t *testing.T, got Test, want Test) + func AssertTests(t *testing.T, got []Test, want []Test) + func AssertText(t *testing.T, got, want string) + func AssertThreadCount(t *testing.T, pool *SpyThreadPool, want int) + func AssertTimes(t *testing.T, got map[int]*TestResult, want map[int]time.Duration) + func AssertVerdicts(t *testing.T, got map[int]*TestResult, want map[int]Verdict) + func DumpLexemes(xms []RichText, color aurora.Color) string + func IsFloatLexeme(xm string) bool + func IsIntLexeme(xm string) bool + func ScanConfig(text string) (config map[string]string, key2line map[string]NumberedLine, errs []error) + func ScanKeyValuePair(line string) (string, string, error) + func ScanLexemes(data []byte, atEOF bool) (advance int, token []byte, err error) + func SplitByInlinedPrefixN(text, delim string, n int) (parts []string) + func StringMapUnmarshal(kvm map[string]string, data interface{}, transformers ...func(string) string) error + type ConfigurableStopwatcher struct + Clock clockwork.Clock + TL time.Duration + func (s *ConfigurableStopwatcher) Elapsed(since time.Time) time.Duration + func (s *ConfigurableStopwatcher) Now() time.Time + func (s *ConfigurableStopwatcher) TimeLimit(since time.Time) <-chan time.Time + type ExecutionResult struct + ExitCode int + Stderr string + Stdout string + type FieldError struct + Err error + FieldName string + func (e *FieldError) Error() string + func (e *FieldError) Unwrap() error + type Inputs struct + Config InputsConfig + Tests []Test + func ScanInputs(text string) (inputs Inputs, errs []error) + type InputsConfig struct + Prec uint8 + Tl PositiveDuration + var DefaultInputsConfig InputsConfig + type Lexer struct + Precision uint + func (l *Lexer) Compare(target, source []string) (rts []RichText, ok bool) + func (l *Lexer) GenMaskForFloat(target, source string) (mask []bool) + func (l *Lexer) GenMaskForInt(target, source string) (mask []bool) + func (l *Lexer) GenMaskForString(target, source string) (mask []bool) + func (l *Lexer) GenerateMask(target, source string) []bool + func (l *Lexer) Scan(text string) (xms []string) + type LineRangeError struct + Begin int + Err error + Lines []string + func (e *LineRangeError) CodeSnippet() string + func (e *LineRangeError) Error() string + func (e *LineRangeError) Reason() string + func (e *LineRangeError) Unwrap() error + type NotTextUnmarshalableTypeError struct + Field string + Type reflect.Kind + TypeName string + func (e *NotTextUnmarshalableTypeError) Equal(other *NotTextUnmarshalableTypeError) bool + func (e *NotTextUnmarshalableTypeError) Error() string + type NotValueOfTypeError struct + Type string + Value string + func (e *NotValueOfTypeError) Equal(other *NotValueOfTypeError) bool + func (e *NotValueOfTypeError) Error() string + type NumberedLine struct + Line string + Num int + type PositiveDuration struct + func NewPositiveDuration(dur time.Duration) PositiveDuration + func (d *PositiveDuration) UnmarshalText(b []byte) error + type Processer interface + Run func(context.Context, io.Reader) (ExecutionResult, error) + type ProcesserFunc func(ctx context.Context, r io.Reader) (ExecutionResult, error) + func (p ProcesserFunc) Run(ctx context.Context, r io.Reader) (ExecutionResult, error) + type RichText struct + Mask []bool + Str string + func (rt RichText) Colorful() bool + func (rt RichText) Colorize(color aurora.Color) string + type Runnable interface + Run func() + type RunnableFunc func() + func (f RunnableFunc) Run() + type SpyPrinter struct + Finished bool + FinishedIDs []int + FinishedTests []*Test + StartedIDs []int + func (l *SpyPrinter) SuiteFinished(*TestingBatch) + func (l *SpyPrinter) TestFinished(test *Test, result *TestResult) + func (l *SpyPrinter) TestStarted(id int) + type SpyProcesser struct + Proc Processer + func (p *SpyProcesser) CallCount() int + func (p *SpyProcesser) Run(ctx context.Context, r io.Reader) (ExecutionResult, error) + type SpyThreadPool struct + DirtyThreads map[int]struct{} + func NewSpyThreadPool(threadCount int) *SpyThreadPool + func (p *SpyThreadPool) Execute(task Runnable) error + func (p *SpyThreadPool) WorkerCount() int + type Stopwatcher interface + Elapsed func(since time.Time) time.Duration + Now func() time.Time + TimeLimit func(since time.Time) <-chan time.Time + type StringError string + const TLError + func (e StringError) Error() string + type StubTestingEventListener struct + func (*StubTestingEventListener) SuiteFinished(*TestingBatch) + func (*StubTestingEventListener) TestFinished(*Test, *TestResult) + func (*StubTestingEventListener) TestStarted(int) + type Test struct + Input string + Output string + func ScanTest(testStr string) (Test, []error) + type TestError struct + Err error + TestNum int + func (e *TestError) Error() string + func (e *TestError) Unwrap() error + type TestExecutionResult struct + Err error + ID int + Out ExecutionResult + type TestFinishedCallback func(*Test, *TestResult) + func (cb TestFinishedCallback) SuiteFinished(*TestingBatch) + func (cb TestFinishedCallback) TestFinished(test *Test, result *TestResult) + func (cb TestFinishedCallback) TestStarted(int) + type TestResult struct + RichAnswer []RichText + RichOut []RichText + Time time.Duration + Verdict Verdict + type TestingBatch struct + Listener TestingEventListener + Lx *Lexer + Proc Processer + Results map[int]*TestResult + Swatch Stopwatcher + ThreadPool WorkerPool + func NewTestingBatch(inputs Inputs, proc Processer, swatch Stopwatcher, pool WorkerPool) *TestingBatch + func (b *TestingBatch) Run() + type TestingEventListener interface + SuiteFinished func(*TestingBatch) + TestFinished func(*Test, *TestResult) + TestStarted func(id int) + type ThreadPool struct + func NewThreadPool(count int) *ThreadPool + func (p *ThreadPool) Execute(task Runnable) error + func (p *ThreadPool) WorkerCount() int + type Verdict int + const IE + const OK + const RE + const TL + const WA + type WorkerPool interface + Execute func(task Runnable) error + WorkerCount func() int