Documentation ¶
Overview ¶
Package difftest implement test based on diffing serialized string output
User provides a function that get a input path and input string and returns a output path and output string. Content of output path and output string is compared and if there is a difference the test fails with a diff.
Test inputs are read from files matching Pattern from Path.
Note that output path can be the same as input which useful if the function implements some kind of transcript that includes both input and output.
Index ¶
- func Error(t tf, expected string, actual string)
- func ErrorEx(t tf, color bool, expected string, actual string)
- func Fatal(t tf, expected string, actual string)
- func FatalEx(t tf, color bool, expected string, actual string)
- func Test(t *testing.T, pattern string, fn Fn)
- func TestWithOptions(t *testing.T, opts Options)
- type Fn
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestWithOptions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.