Last active
March 9, 2020 02:13
-
-
Save typeswitch-dev/a3f306a18332998a8d0af7285fabe01f to your computer and use it in GitHub Desktop.
Minimalistic unit testing framework for Idris.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
||| 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