diff options
| author | Alasdair Armstrong | 2017-07-26 14:12:09 +0100 |
|---|---|---|
| committer | Alasdair Armstrong | 2017-07-26 14:12:09 +0100 |
| commit | 678ab0e23ba4a8d95010df2bd2467dae7d544e29 (patch) | |
| tree | 0b2e02773327b9483f24b2e1ad46b7235ec9633e /src/test/lib/tests/test_ext.sail | |
| parent | 26e59493cde0ffbf1868426fe3bec158f2dbaad0 (diff) | |
| parent | 18cf235fad35a0e06e26ea91ee0e1c673febddb8 (diff) | |
Merge remote-tracking branch 'origin/master' into sail_new_tc
Diffstat (limited to 'src/test/lib/tests/test_ext.sail')
| -rw-r--r-- | src/test/lib/tests/test_ext.sail | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/lib/tests/test_ext.sail b/src/test/lib/tests/test_ext.sail new file mode 100644 index 00000000..1cbc2855 --- /dev/null +++ b/src/test/lib/tests/test_ext.sail @@ -0,0 +1,15 @@ +function unit test () = { + test_assert ("extz0", EXTZ(0b00) == 0x00); + test_assert ("extz1", EXTZ(0b10) == 0x02); + test_assert ("extz2", EXTZ(0b10) == 0b10); + test_assert ("extz3", EXTZ(0b10) == 0b0); + + test_assert ("exts0", EXTS(0b00) == 0x00); + test_assert ("exts1", EXTS(0b10) == 0xfe); + test_assert ("exts2", EXTS(0b10) == 0b10); + test_assert ("exts3", EXTS(0b10) == 0b0); + + test_assert ("most_significant0", most_significant(0b011) == bitzero); + test_assert ("most_significant1", most_significant(0b100) == bitone); + } + |
