TestFunc : Type -> Type A function which can report test failures.
Visibility: public exportrecord Test : Type Value representing a test.
Use the `test` function to create a value of this type.
Totality: total
Visibility: public export
Constructor: MkTest : String -> TestFunc () -> Test
Projections:
.description : Test -> String .run : Test -> TestFunc ()
.description : Test -> String- Visibility: public export
description : Test -> String- Visibility: public export
.run : Test -> TestFunc ()- Visibility: public export
run : Test -> TestFunc ()- Visibility: public export
test : String -> TestFunc () -> Test Create a new `Test` with a description and function to run.
Use `Test.Runner.runTests` to run the tests.
```idris example
itWorks = test "it works" $ do
assertEq (1 + 1) 2
```
Visibility: public exportrecord Location : Type- Totality: total
Visibility: public export
Constructor: Loc : FC -> Location
Projection: .inner : Location -> FC
.inner : Location -> FC- Visibility: public export
inner : Location -> FC- Visibility: public export
emptyLoc : Location- Visibility: export
here : TTImp -> Elab Location Get a `Location` token
This can be passed to assertion to attach source location
```idris example
let loc = here `(())
in assertEq {loc}
Visibility: exportformatLoc : Location -> String- Visibility: export
assertEq : (Eq a, Show a) => {default emptyLoc _ : Location} -> a -> a -> TestFunc () Assert that two values are equal.
Stops the test and reports a test failure if the values are not equal.
Visibility: public exportassertNotEq : (Eq a, Show a) => {default emptyLoc _ : Location} -> a -> a -> TestFunc () Assert that two values are not equal.
Stops the test and reports a test failure if the values are equal.
Visibility: public exportassert : {default emptyLoc _ : Location} -> Bool -> TestFunc () Assert that a condition holds.
Stops the test and reports a test failure if the condition does not hold.
Visibility: public exportthrow : String -> TestFunc a Cause a test failure with a message.
Visibility: public export