Test: Negative QuickCheck Tests
- Dominant language
- Haskell
- Stars
- 279
- Forks
- 51
- Avg merge
- 17h 42m
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the current QuickCheck tests and the generator that produces typechecking behaviours. Review how generated behaviours are checked, then add negative cases for duplicate writes, behaviour names, constructor storage names, and calldata argument names, with completion shown by tests rejecting these invalid specifications.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- compilers, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100