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

phase out pseudorandom test-case generators #110

Open
1 task
aszepieniec opened this issue Feb 26, 2024 · 0 comments
Open
1 task

phase out pseudorandom test-case generators #110

aszepieniec opened this issue Feb 26, 2024 · 0 comments

Comments

@aszepieniec
Copy link
Contributor

aszepieniec commented Feb 26, 2024

With the introduction of time locks (#107) we have implementations of either arbitrary::Arbitrary or proptest::Arbitrary for several key structs related to transaction validity. Previously, we had pseudorandom mock object generators. In fact, there still are some, in particular in connection to removal records integrity. These should be phased out --

  • phase out pseudorandom test case generators

-- and replaced with appropriate implementations of Arbitrary. Using the test frameworks proptest, arbitrary, and test_strategy is preferable because:

  • ✓(like pseudorandom generators) they can be fully derandomized
  • ✓failing test cases are automatically recorded and saved to disk
  • ✓failing test cases are automatically reduced to still failing test cases with minimal complexity
  • ✓writing constraints for arbitrary objects is simple and straightforwards, and results in concise property tests.
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

No branches or pull requests

1 participant