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