I'll prefix my question by saying I'm unfamiliar with QC beyond knowing of its existence and roughly what it does in terms of generating test values:
Am I misunderstanding, or is this akin to QuickCheck for C#?
Am I misunderstanding, or is this akin to QuickCheck for C#?
[1] http://www.cse.chalmers.se/~rjmh/QuickCheck/manual.html [2] http://research.microsoft.com/en-us/projects/pex/ [3] http://research.microsoft.com/en-us/projects/z3m/ [4] http://www.pexforfun.com/
// What values of v and i can cause an exception? Ask Pex to find out!
public static void Puzzle(int[] v, int i)
{
if (v[i + 2] + 5 == v.Length + i)
throw new Exception("hidden bug!");
}
and then it automatically finds the breaking input: {-6} -2 Exception hidden bug!