We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Since we don't have a property check library in Nim yet, I sometimes find myself writing tests like this:
test "foo" for i in 1..N: checkpoint("i = $#" % $i) check: f(i) == g(i)
This, of course, generates a lot of output on failure. There are a few alternatives, but neither of those are satisfactory:
test "foo" for i in 1..N: let f0 = f(i) let g0 = g(i) if f0 != g0: checkpoint("i = $#" % $i) check: f0 == g0
The easiest way to mitigate this that I see is just adding something like the following to unittest:
unittest
proc resetCheckpoints* = checkpoints = @[]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Since we don't have a property check library in Nim yet, I sometimes find myself writing tests like this:
This, of course, generates a lot of output on failure. There are a few alternatives, but neither of those are satisfactory:
The easiest way to mitigate this that I see is just adding something like the following to
unittest
:The text was updated successfully, but these errors were encountered: