You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with this iterator, we can test different properties, like commutativity of operators, via PropCheck's shrinkage approach:
@testcheck(interleave(iquantity(Float32, DEFAULT_R), iquantity(Float32, DEFAULT_R))) do (q1, q2)
q1 * q2 == q2 * q1
end
This is more powerful than writing out test cases by hand since every time it runs, it will randomly check a different part of the code. Manual test cases might keep missing a particular combination of code branches and we may never know about it.
The text was updated successfully, but these errors were encountered:
100% test coverage is not enough!
I think we should add PropCheck.jl testing to probe more edge cases.
Here's a look at how this could work (https://seelengrab.github.io/PropCheck.jl/stable/Examples/structs.html). The following code builds a PropCheck generator of
Quantity{T, R}
s:with this, we can see that the combination of these iterators gives us random quantities:
with this iterator, we can test different properties, like commutativity of operators, via PropCheck's shrinkage approach:
This is more powerful than writing out test cases by hand since every time it runs, it will randomly check a different part of the code. Manual test cases might keep missing a particular combination of code branches and we may never know about it.
The text was updated successfully, but these errors were encountered: