Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 2.44 KB

File metadata and controls

46 lines (35 loc) · 2.44 KB

CsCheck

CsCheck ia a random testing library for C#.

Shrinking Approach

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.

Implemented Challenges

ShrinkingChallengeTests.cs

Challenge Report
bound5 bound5.md
large union list large_union_list.md
reverse reverse.md
calculator calculator.md
length list lengthlist.md
difference difference_must_not_be_zero.md
difference_must_not_be_one.md
difference_must_not_be_small.md
binheap binheap.md
coupling coupling.md
deletion deletion.md
distinct distinct.md
nestedlists nestedlists.md

Running examples

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