adamamer20 / mesa-frames

Extension of mesa for performance and scalability
https://adamamer20.github.io/mesa-frames/api
MIT License
8 stars 1 forks source link

Test-Driven Development Using `hypothesis` and `deal` #20

Open adamamer20 opened 3 weeks ago

adamamer20 commented 3 weeks ago

hypothesis is a property-based testing library that generates test cases automatically, covering a wide range of input scenarios. This approach helps uncover edge cases and unexpected behaviors that might be missed with manually written tests.

deal is a contract-based programming library that enforces a Design by contract (DbC) approach for functions, specifying preconditions, postconditions, and invariants. This ensures that functions behave as expected, making the codebase more robust and predictable. Additionally, Deal has an experimental feature for formal verification, which provides mathematical proof of code correctness, further enhancing reliability.

rht commented 2 weeks ago

That looks powerful, more systematic and comprehensive than asking a generative AI to write the tests for the uncovered code. I'm pleased that we are doing a different way of doing ABM (no more first mover advantage problem), and at the same time doing a more rigorous approach to code validity and soundness, approaching SELinux.