Skip to content

Instantly share code, notes, and snippets.

@typeswitch-dev
Last active March 9, 2020 02:13
Show Gist options
  • Save typeswitch-dev/a3f306a18332998a8d0af7285fabe01f to your computer and use it in GitHub Desktop.
Save typeswitch-dev/a3f306a18332998a8d0af7285fabe01f to your computer and use it in GitHub Desktop.
Minimalistic unit testing framework for Idris.
||| Minimalistic unit testing framework for idris.
module Test
%access public export
%default total
data Test : Type where
Check : (x: Type) -> {auto p: x} -> Test
Forall : (t: Type) -> (t -> Test) -> Test
(>>=) : Test -> (() -> Test) -> Test
example_tests : Test
example_tests = do
Check (1 + 1 = 2)
Check (2 + 2 = 4)
Check ("hello " ++ "world" = "hello world")
Forall Nat $ \x => do
Check (0 + x = x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment