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

Test: Negative QuickCheck Tests #87

Open
d-xo opened this issue Jan 13, 2021 · 0 comments
Open

Test: Negative QuickCheck Tests #87

d-xo opened this issue Jan 13, 2021 · 0 comments
Labels
tests Improvements to the test suite

Comments

@d-xo
Copy link
Collaborator

d-xo commented Jan 13, 2021

The current quickcheck tests only produce behaviours that should typecheck. It would be cool to have a generator that produces behaviours that should fail to typecheck.

One possible approach would be to introduce some known bad mutations into the behaviours produced from the current generator. Some ideas:

  1. Multiple writes to the same storage location
  2. Duplicated behaviour names
  3. Duplicated names for storage entries in the constructor definition
  4. Duplicated names for calldata args

Many bad specs are impossible to generate at the level of the Refined AST (e.g. we cannot produce an expression adding a bool to an int), so perhaps in the future we may wish to investigate a generator that produces act as a string directly which would give us a lot more freedom in producing incorrect acts.

@d-xo d-xo added the tests Improvements to the test suite label Jan 13, 2021
@ethereum ethereum deleted a comment from staccDOTsol Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Improvements to the test suite
Projects
None yet
Development

No branches or pull requests

1 participant