| 24 | } |
| 25 | |
| 26 | void TestDecode(coding::HuffmanCoder const & h, uint32_t bits, uint32_t len, uint32_t expected) |
| 27 | { |
| 28 | coding::HuffmanCoder::Code code(bits, len); |
| 29 | uint32_t received; |
| 30 | TEST(h.Decode(code, received), ("Could not decode", code.bits, "( length", code.len, ")")); |
| 31 | TEST_EQUAL(expected, received, ()); |
| 32 | } |
| 33 | } // namespace |
| 34 | |
| 35 | namespace coding |