Introduce Property-Based Testing to Validate Engine Invariants #14
Labels
No labels
Epic
GHA
Release
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
major
question
rust
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
NiXTheDev/Ogex#14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal: Increase test coverage by generating random regex patterns and inputs to verify core properties.
Current unit tests cover specific cases but may miss edge cases. Property-based testing can automatically explore a wide range of inputs and check invariants.
Proposed Approach:
Use the
proptestcrate to generate random regex ASTs (or patterns) and random input strings, then verify properties like:regex.is_match(input)is true, thenregex.find(input)should return a match with correct start/end.find_allshould return non-overlapping matches in order.Implementation Steps:
proptestas a dev-dependency.Example:
Benefits: