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/tests/test_lt.sail | |
| parent | d8969b1f9631dc15d5fb6b3b33a4a69dbfb7358a (diff) | |
split library tests into separate files to avoid risk of sail compiler stack overflow.
Diffstat (limited to 'src/test/lib/tests/test_lt.sail')
| -rw-r--r-- | src/test/lib/tests/test_lt.sail | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/test/lib/tests/test_lt.sail b/src/test/lib/tests/test_lt.sail new file mode 100644 index 00000000..6ae7a3c3 --- /dev/null +++ b/src/test/lib/tests/test_lt.sail @@ -0,0 +1,36 @@ +function unit test() = { + test_assert("lt0", not( 1 < -1)); + test_assert("lt1", not(-1 < -1)); + test_assert("lt2", (-1 < 1)); + + (* XXX default is signed -- document this! *) + test_assert("lt_vec0", not(0x1 < 0xf)); + test_assert("lt_vec1", not(0xf < 0xf)); + test_assert("lt_vec2", (0xf < 0x1)); + + test_assert("lt_vec_range0", not(0x1 < -1)); + test_assert("lt_vec_range1", not(0xf < -1)); + test_assert("lt_vec_range2", (0xf < 1)); + (* NB missing range_vec version *) + + (* XXX missing implementations + test_assert("lt_unsigned0", not( 1 <_u -1)); + test_assert("lt_unsigned1", not(-1 <_u -1)); + test_assert("lt_unsigned2", (-1 <_u 1)); *) + + test_assert("lt_vec_unsigned0", (0x1 <_u 0xf)); + test_assert("lt_vec_unsigned1", not(0xf <_u 0xf)); + test_assert("lt_vec_unsigned2", not(0xf <_u 0x1)); + + (* NB there is no lt_vec_range unsigned or signed *) + + (* XXX missing implementations + test_assert("lt_signed0", not( 1 <_s -1)); + test_assert("lt_signed1", not(-1 <_s -1)); + test_assert("lt_signed2", (-1 <_s 1)); *) + + test_assert("lt_vec_signed0", not(0x1 <_s 0xf)); + test_assert("lt_vec_signed1", not(0xf <_s 0xf)); + test_assert("lt_vec_signed2", (0xf <_s 0x1)); +} + |
