NAME

include/macros/assert.pir - macros for checking assumptions

Macros

ASSERT_TYPE(A,T)

Asserts that A is of type T, throwing a error of type "type-error" on failure

ASSERT_TYPE_AND_BRANCH(A,T,B)

Asserts that A is of type T, branching to B on failure.

ASSERT_LENGTH(A,L,B)

Asserts that list A is of length L, branching to B on failure.

ASSERT_MINIMUM_LENGTH(A,L,B)

Asserts that list A is at least of length L, branching to B on failure.

ASSERT_LENGTH_BETWEEN(A,L,M,B)

Asserts that list A is at least of length L and at most of length M, branching to B on failure.

ASSERT_EVEN_LENGTH(A,B)

Asserts that list A is composed of an even number of elements, branching to B on failure.