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
arbitrarySizedForm :: Int -> Gen Form arbitrarySizedForm n | n <= 0 = do t <- arbitrary return (Prop t) | n > 0 = oneof [liftM Neg subForm, liftM Cnj subFormBracets, liftM Dsj subFormBracets, liftM2 Impl subForm subForm, liftM2 Equiv subForm subForm] where subForm = arbitrarySizedForm (n `div` 2) subFormBracets = listOf1 (arbitrarySizedForm (n `div` 4))
Better
arbitrarySizedForm :: Int -> Gen Form arbitrarySizedForm n | n <= 0 = do t <- arbitrary return (Prop t) | n > 0 = oneof [liftM Neg subForm, liftM Cnj subFormBracets, liftM Dsj subFormBracets, liftM2 Impl subForm subForm, liftM2 Equiv subForm subForm] where subForm = arbitrarySizedForm (n `div` 2) subFormBracets = listOf (arbitrarySizedForm (n `div` 4))
Empty list of arguments at Cnj and Dsj are allowed.
Cnj
Dsj
quickCheck (withMaxSuccess 10 prop_checkEquiv) quickCheck (withMaxSuccess 10 prop_checkCNF)
Better is
quickCheck (withMaxSize 5 prop_checkEquiv) quickCheck (withMaxSize 5 prop_checkCNF)
This generates more tests with smaller samples.
Well done! (=9)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Better
Empty list of arguments at
Cnj
andDsj
are allowed.Better is
This generates more tests with smaller samples.
Well done! (=9)
The text was updated successfully, but these errors were encountered: