std.test

Assert

A contract that checks if its argument is the boolean true.

Examples

1 == 2 | std.test.Assert
# => error: contract broken by a value

1 == 1 | std.test.Assert
# => true

assert_all | Array Assert -> Bool

Asserts that all the elements of an array are equal to true. Applies the std.test.Assert contract on each element of the given array.

Evalutes to true if all the elements of the array are equal to true, or fails with a contract error otherwise.

Example

[ (1 == 2), (1 == 1), (1 == 3) ] |> std.test.assert_all
# => error: contract broken by the caller