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_not.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_not.sail')
| -rw-r--r-- | src/test/lib/tests/test_not.sail | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/lib/tests/test_not.sail b/src/test/lib/tests/test_not.sail new file mode 100644 index 00000000..8ae2514f --- /dev/null +++ b/src/test/lib/tests/test_not.sail @@ -0,0 +1,8 @@ +function unit test () = { + test_assert ("not_bit0", (not (bitzero)) == bitone); + test_assert ("not_bit1", (not (bitone)) == bitzero); + + test_assert ("bitwise_not", (~ (0b01) == 0b10)); + test_assert ("bitwise_not_bit0", ((~ (bitzero)) == bitone)); + test_assert ("bitwise_not_bit1", ((~ (bitone)) == bitzero)); +} |
