Skip to content
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

Utilize negative tests in QCheck #78

Merged
merged 20 commits into from
Aug 8, 2022
Merged

Utilize negative tests in QCheck #78

merged 20 commits into from
Aug 8, 2022

Conversation

jmid
Copy link
Collaborator

@jmid jmid commented Jun 1, 2022

This is a WIP PR to try out the negative testing primitive Test.make_neg from c-cube/qcheck#244.
It is intended to fix #29

Overall

  • this allows negative tests to be marked as such with neg_agree_test_par directly in the source code
  • the clunky check_error_count can be eliminated entirely
  • magical constants denoting 1, 2, and 4 errors in dune files are eliminated, and
  • dune files are generally simplified

As an added bonus, it opens up for switching to an alcotest runner as suggested in #15.

I would therefore argue that this is a clear win! \o/

@jmid
Copy link
Collaborator Author

jmid commented Jun 15, 2022

Rebased to latest main

@jmid jmid changed the title [WIP] Utilize negative tests in QCheck Utilize negative tests in QCheck Jun 15, 2022
@jmid
Copy link
Collaborator Author

jmid commented Jun 22, 2022

Test.make_neg is now merged into QCheck master, so this can be picked up again.

@jmid jmid force-pushed the qcheck-test-neg branch 2 times, most recently from b8b264b to c5487bf Compare June 27, 2022 11:49
@jmid
Copy link
Collaborator Author

jmid commented Jun 27, 2022

Rebased after merging #90

@jmid jmid force-pushed the qcheck-test-neg branch from c5487bf to 9692471 Compare July 11, 2022 09:35
@jmid
Copy link
Collaborator Author

jmid commented Jul 11, 2022

Rebased on latest main, having QCheck 0.19 with Test.make_neg as a dependency.

@jmid jmid force-pushed the qcheck-test-neg branch from f95f555 to dc4d66e Compare July 14, 2022 17:18
@jmid
Copy link
Collaborator Author

jmid commented Jul 14, 2022

I just annotated the new DSL-ported tests with suitable neg_ suffixes.
Planning to merge this assuming the CI doesn't complain too much.

@jmid jmid force-pushed the qcheck-test-neg branch from f9a2805 to f241cfb Compare August 8, 2022 14:44
@jmid
Copy link
Collaborator Author

jmid commented Aug 8, 2022

(Hopefully) last rebasing on main

@jmid jmid merged commit 93595e5 into main Aug 8, 2022
@jmid jmid deleted the qcheck-test-neg branch August 8, 2022 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mark tests as negative in test source code
1 participant