startest/expect
Assertions to be used in tests.
Functions
pub fn to_be_error(actual: Result(a, b)) -> b
Asserts that the given value is Error(_)
.
pub fn to_equal(actual: a, expected expected: a) -> Nil
Asserts that the given value is equal to the expected value.
pub fn to_loosely_equal(
actual: Float,
expected expected: Float,
tolerating tolerance: Float,
) -> Nil
Asserts that the given Float
is equal to the expected Float
within the
provided tolerance.
pub fn to_not_equal(actual: a, expected expected: a) -> Nil
Asserts that the given value is not equal to the expected value.
pub fn to_not_throw(f: fn() -> a) -> a
Asserts that the given function does not throw an error.