Class Contracts
Mercury has support for Class Contracts, allowing you to provide Pre- and Post-Conditions for methods and type-wide Invariants to create classes and structs that can test themselves.
Please refer to the Class Contracts topic for more details.
Keywords
Ensure
Check
Invariants
Old
Require
See Also
- Class Contracts topic in Concepts Section
- Invariants and Pre- and Post-Conditions, and the
old
andimplies
Operators in Oxygene