testbldr
Types
A test has a name and a body (a function which returns a TestOutcome)
pub type Test =
#(String, fn() -> TestOutcome)
A test can either pass or fail with a given reason
pub type TestOutcome {
Pass
Fail(msg: String)
}
Constructors
-
Pass
-
Fail(msg: String)
Constants
Functions
pub fn named(name: String, new_test: fn() -> TestOutcome) -> #(
String,
fn() -> TestOutcome,
)
Creates a new test with the given name
pub fn run(input: List(#(String, fn() -> TestOutcome))) -> Nil
Run the tests and print the test run output
pub fn test(input: List(#(String, fn() -> TestOutcome)), name: String, new_test: fn() ->
TestOutcome) -> List(#(String, fn() -> TestOutcome))
Add a single test to the test suite