aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/thuffman.nim12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/thuffman.nim b/tests/thuffman.nim
index 0294694..db209f4 100644
--- a/tests/thuffman.nim
+++ b/tests/thuffman.nim
@@ -90,15 +90,15 @@ suite "huffencoder":
90 test "buildCodebook": 90 test "buildCodebook":
91 let codebook = buildCodebook(tree, uint) 91 let codebook = buildCodebook(tree, uint)
92 check codebook.len == 3 92 check codebook.len == 3
93 check codebook[1'u] == 0b0 93 check codebook[1'u] == (1, 0b0'u)
94 check codebook[2'u] == 0b01 94 check codebook[2'u] == (2, 0b01'u)
95 check codebook[3'u] == 0b11 95 check codebook[3'u] == (2, 0b11'u)
96 96
97 test "encode": 97 test "encode":
98 let encoder = tree.encoder(uint) 98 let encoder = tree.encoder(uint)
99 check encoder.encode(1'u) == 0b0 99 check encoder.encode(1'u) == (1, 0b0'u)
100 check encoder.encode(2'u) == 0b01 100 check encoder.encode(2'u) == (2, 0b01'u)
101 check encoder.encode(3'u) == 0b11 101 check encoder.encode(3'u) == (2, 0b11'u)
102 102
103suite "huffdecoder": 103suite "huffdecoder":
104 test "decode": 104 test "decode":