Crate dbc [−] [src]
Design-by-Contract for Go
Design by Contract is a programming methodology
which binds the caller and the function called to a
contract. The contract is represented using Hoare Triple:
{P} C {Q}
, where {P}
is the precondition before
executing command C
, and {Q}
is the postcondition.
See Also
- http://en.wikipedia.org/wiki/Design_by_contract
- http://en.wikipedia.org/wiki/Hoare_logic
- https://dlang.org/spec/contracts.html
Note
This library is similar to my godbc for Golang.
Macros
ensure |
Postcondition tests |
formatvar |
Stringify one or more variables and their values |
invariant |
Invariant condition assertion |
require |
Precondondition tests |
Traits
Invariant |
The |