diff options
| author | Robert Norton | 2017-07-19 18:08:02 +0100 |
|---|---|---|
| committer | Robert Norton | 2017-07-19 18:08:02 +0100 |
| commit | 632b10c0d4b01dc1af8593b8ae1f088fbfd9e342 (patch) | |
| tree | ac566808213125670da5f4dc3d702fe663333f7e /src/test/lib/test_prelude.sail | |
| parent | d8969b1f9631dc15d5fb6b3b33a4a69dbfb7358a (diff) | |
split library tests into separate files to avoid risk of sail compiler stack overflow.
Diffstat (limited to 'src/test/lib/test_prelude.sail')
| -rw-r--r-- | src/test/lib/test_prelude.sail | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/lib/test_prelude.sail b/src/test/lib/test_prelude.sail new file mode 100644 index 00000000..3525af8e --- /dev/null +++ b/src/test/lib/test_prelude.sail @@ -0,0 +1,19 @@ +default Order inc + +scattered typedef ast = const union +val ast -> unit effect pure execute +scattered function unit execute + +union ast member (unit) DUMMY +function clause execute (DUMMY) = () + +end ast +end execute + +function unit test_assert (name, pred) = { + print (name); + if pred then + print (": pass\n") + else + print(": fail\n") +} |
