View Source SimpleAssert (simple_assert v0.2.0)
SimpleAssert asserts the given parameter is true
or false
.
Link to this section Summary
Link to this section Functions
Specs
Asserts the e
is false
or nil
.
If it succeeds, it returns :ok
. Raises an error otherwise.
Examples
iex> SimpleAssert.assert_false(false)
:ok
iex> SimpleAssert.assert_false(nil)
:ok
iex> SimpleAssert.assert_false(:unexpected_result)
** (ArgumentError) assertion failed!
Specs
Asserts the e
is true
.
If it succeeds, it returns :ok
. Raises an error otherwise.
Examples
iex> SimpleAssert.assert_true(1 == 1)
:ok
iex> SimpleAssert.assert_true(1 == 2)
** (ArgumentError) assertion failed!