object

# assertions(Mode)

> A simple assertions framework. Can be used as a hook object for either suppressing assertions ("production" mode) or expanding them with file context information ("debug" mode).

author:
  `Paulo Moura`
version:
  `2.1`
date:
  `2018/2/20`

compilation flags:
  `static, context_switching_calls`

implements:
  `public expanding`

## Public interface

### assertion/1

> Checks that an assertion is true. Uses the structured message printing mechanism for printing the results using a silent message for assertion success and a error message for assertion failure.

compilation flags:
  `static`
template:
  `assertion(Goal)`
meta-predicate template:
  `assertion(0)`
mode – number of proofs:
  `assertion(@callable) – one`

### assertion/2

> Checks that an assertion is true. Uses the structured message printing mechanism for printing the results using a silent message for assertion success and a error message for assertion failure. The context argument can be used to pass location data.

compilation flags:
  `static`
template:
  `assertion(Context,Goal)`
meta-predicate template:
  `assertion(*,0)`
mode – number of proofs:
  `assertion(@term,@callable) – one`

## Protected interface

(see related entities)

## Private predicates

(see related entities)

## Operators

### (none)

## Remarks

### (none)

## See also

### (none)