Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 630 Bytes

README.md

File metadata and controls

32 lines (22 loc) · 630 Bytes

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.