How kaio-souza/nim-proptest works
proptest is a Nim property-based testing library: users declare properties, the library generates cases, detects failures, shrinks counterexamples, and reports results that can be replayed. Its documented capabilities also include derived generators, stateful testing, coverage labels, boundary-seeking exploration, JSON Lines reporting, and a hang watchdog. The source excerpts were unavailable, so relationships below are limited to those stated in the README; module-level call details are not inferred.
Main entry points: engine.nim Test engine · proptest.nim Property API · shrink.nim Counterexample shrinking · report.nim Result reporting
Components 16
Property API
- Property API
src/proptest.nim - Assertions
src/proptest/assertions.nim - Generators
src/proptest/gen.nim - Choice tracking
src/proptest/choices.nim
Property Execution
- Test engine
src/proptest/engine.nim - Seeded randomness
src/proptest/prng.nim - Stateful testing
src/proptest/stateful.nim
Failure Handling
- Counterexample shrinking
src/proptest/shrink.nim - Failure database
src/proptest/database.nim - Failure identity
src/proptest/signature.nim - Hang watchdog
src/proptest/watchdog.nim
Exploration and Reporting
- Coverage labels
src/proptest/labels.nim - Boundary exploration
src/proptest/mining.nim - Result reporting
src/proptest/report.nim - JSON Lines output
src/proptest/jsonout.nim
Other components
- Property author
Connections 15
- Property author → Property API: declares properties
README.md - Property API → Test engine: runs properties
README.md - Test engine → Generators: generates inputs
README.md - Test engine → Seeded randomness: uses seed
README.md - Test engine → Assertions: evaluates assertions
README.md - Test engine → Stateful testing: runs stateful tests
README.md - Test engine → Failure database: replays failures
README.md - Test engine → Counterexample shrinking: shrinks failures
README.md - Test engine → Failure identity: identifies failures
README.md - Test engine → Hang watchdog: limits case runtime
README.md - Test engine → Coverage labels: tracks coverage
README.md - Test engine → Boundary exploration: seeks boundaries
README.md - Test engine → Result reporting: produces results
README.md - Result reporting → JSON Lines output: writes JSON Lines
README.md - Counterexample shrinking → Failure database: saves failures