-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
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
Test that properties fail correctly #47
Comments
Thing is: our ∃ cannot discern the difference between failure and the RNG skipping or not even reaching a value. Until I have a finer-grained understanding of what it means to fail in an existential built into that pull request I wouldn't know what to test. |
Ok, not a great example. Being able to test property failure correctly in the general case is still useful. |
Mhm... I'm thinking the existential is only good as a synonym for |
OK, now that I read this over again Past Me decided talking past you was a productive avenue. He is an idiot, sorry. So what about this is different from the |
Ah, I understand the miscommunication now. I’m not talking about using SwiftCheck to test the failure of my code’s properties. Instead, I would like for SwiftCheck to verify (via its tests) that if some arbitrary property doesn’t hold, the test fails. And specifically that this should be the case for |
The test for
exists
in #45 is simply returningtrue
. A more interesting property ofexists
is its failure when something doesn’t exist.My tests in Assertions do a little trickery (discovered by @ishkawa) to enable testing assertion failures without actually failing its own tests. It would be nice to use something like this to test that properties which don’t hold, fail.
The text was updated successfully, but these errors were encountered: