v0.42.0
testcase.Race
Race is a test helper that allows you to create a race situation easily.
This is useful when you work on a component that requires thread-safety.
By using the Race helper, you can write an example use of your component,
and run the testing suite with go test -race
.
The race detector then should be able to notice issues with your implementation.
testcase.T.Random
T.Random is a random generator that uses the Spec seed.
When a test fails with random input from Random generator,
the failed test scenario can be recreated simply by providing the same TESTCASE_SEED
as you can read from the console output of the failed test.
testcase.Var Thread Safety
testcase.Var.Get
and testcase.Var.Set
now thread-safe.