From d661132528d5c27148a0b55d52709ce97124000a Mon Sep 17 00:00:00 2001 From: pacien Date: Wed, 28 Nov 2018 15:20:14 +0100 Subject: add huffman tree structure and serialisation --- tests/tintegers.nim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/tintegers.nim') 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": check truncateToUint8(0x00FA'u16) == 0xFA'u8 check truncateToUint8(0xFFFA'u16) == 0xFA'u8 + test "bitLength": + check bitLength(0b1_1111) == 5 + check bitLength(0b1000_0000) == 8 + test "leastSignificantBits": check leastSignificantBits(0xFF'u8, 3) == 0b0000_0111'u8 check leastSignificantBits(0b0001_0101'u8, 3) == 0b0000_0101'u8 -- cgit v1.2.3