From 632b10c0d4b01dc1af8593b8ae1f088fbfd9e342 Mon Sep 17 00:00:00 2001 From: Robert Norton Date: Wed, 19 Jul 2017 18:08:02 +0100 Subject: split library tests into separate files to avoid risk of sail compiler stack overflow. --- src/test/lib/tests/test_leftshift.sail | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/test/lib/tests/test_leftshift.sail (limited to 'src/test/lib/tests/test_leftshift.sail') diff --git a/src/test/lib/tests/test_leftshift.sail b/src/test/lib/tests/test_leftshift.sail new file mode 100644 index 00000000..15c308bc --- /dev/null +++ b/src/test/lib/tests/test_leftshift.sail @@ -0,0 +1,11 @@ +function unit test () = { + test_assert ("leftshift_small0", (0x99 << 0) == 0x99); + test_assert ("leftshift_small3", (0x99 << 3) == 0xc8); + test_assert ("leftshift_small7", (0x99 << 7) == 0x80); + test_assert ("leftshift_small8", (0x99 << 8) == 0x00); + test_assert ("leftshift_big0", (0x99999999999999999 << 0) == 0x99999999999999999); + test_assert ("leftshift_big3", (0x99999999999999999 << 3) == 0xcccccccccccccccc8); + test_assert ("leftshift_big7", (0x99999999999999999 << 7) == 0xccccccccccccccc80); + test_assert ("leftshift_big68", (0x99999999999999999 << 68) == 0x00000000000000000); +} + -- cgit v1.2.3