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

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 Invariant trait allows for asserting an object