aboutsummaryrefslogtreecommitdiff
path: root/tests/tintegers.nim
diff options
context:
space:
mode:
authorpacien2018-11-28 15:20:14 +0100
committerpacien2018-11-28 15:20:14 +0100
commitd661132528d5c27148a0b55d52709ce97124000a (patch)
tree31aeb46872fd70b409633e163c0bc0bfbb825429 /tests/tintegers.nim
parent3d44208aaaeca516eb08a90c98635543cae2bd4d (diff)
downloadgziplike-d661132528d5c27148a0b55d52709ce97124000a.tar.gz
add huffman tree structure and serialisation
Diffstat (limited to 'tests/tintegers.nim')
-rw-r--r--tests/tintegers.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/tintegers.nim b/tests/tintegers.nim
index 956e4aa..851e926 100644
--- a/tests/tintegers.nim
+++ b/tests/tintegers.nim
@@ -27,6 +27,10 @@ suite "integers":
27 check truncateToUint8(0x00FA'u16) == 0xFA'u8 27 check truncateToUint8(0x00FA'u16) == 0xFA'u8
28 check truncateToUint8(0xFFFA'u16) == 0xFA'u8 28 check truncateToUint8(0xFFFA'u16) == 0xFA'u8
29 29
30 test "bitLength":
31 check bitLength(0b1_1111) == 5
32 check bitLength(0b1000_0000) == 8
33
30 test "leastSignificantBits": 34 test "leastSignificantBits":
31 check leastSignificantBits(0xFF'u8, 3) == 0b0000_0111'u8 35 check leastSignificantBits(0xFF'u8, 3) == 0b0000_0111'u8
32 check leastSignificantBits(0b0001_0101'u8, 3) == 0b0000_0101'u8 36 check leastSignificantBits(0b0001_0101'u8, 3) == 0b0000_0101'u8