Skip to content

anoma/juvix-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A testing framework for Juvix

Obtain the Juvix compiler at https://github.com/anoma/juvix

Example

The following module defines a simple test suite:

module Example;

import Stdlib.Prelude open;
import Test.JuvixUnit open;

tests : List Test :=
  [testCase "1 == 1" (assertEqual "1 /= 1" 1 1)];

main : IO := runTestSuite (testSuite "Example" tests);

Compile and run the test suite:

$ juvix compile Example.juvix
$ ./Example
Test suite 'Example'
1 == 1		OK
All tests from test suite 'Example' complete
Suite passed

For more examples see Example.juvix or the test suite.