CsCheck ia a random testing library for C#.
CsCheck Gen<T>
generates a type T
and Size
using a random number generator PCG. Shrinking is simply continuing this sequence but skipping any that have a Size
equal or greater than the current lowest failing Size. Shrinking is integrated and composable.
This has some quite different properties to other PBT libraries. The seed is of the shrunk case itself so is more easily reproduced and shrinking can be continued later on a local machine say for as long as wanted.
Default 100 iterations:
dotnet test -c Release --filter ShrinkingChallendgeTests
For 1 minute:
$env:CsCheck_Time=60; dotnet test -c Release --filter ShrinkingChallendgeTests; rm env:CsCheck*
Or each test individually:
dotnet test -c Release --filter ShrinkingChallendgeTests.No1_Bound5