Mercurial > dedupe
view TestHuffmanString.cpp @ 70:c2ad34480216
Quieting clang is obviously only needed for clang and breaks other compilers.
| author | Tom Fredrik Blenning Klaussen <bfg@bfgconsult.no> |
|---|---|
| date | Sat, 12 Jan 2013 12:15:34 +0100 |
| parents | 7905fa8a3f1b |
| children |
line wrap: on
line source
#include "HuffmanString.hpp" #include "TestFramework.hpp" BOOST_AUTO_TEST_CASE( TestSimple ) { HuffmanSet set; set.setCutoff(1); QList<HuffmanString> strList; for (uint n = 0; n < 100; ++n) { QString str = QString("test%1").arg(n); strList << HuffmanString(str, &set); for (uint i = 0; i <= n; ++i) { QString str = QString("test%1").arg(i); BOOST_REQUIRE_EQUAL(strList[i], str); } } } BOOST_AUTO_TEST_CASE( TestEmpty ) { HuffmanSet set; set.setCutoff(1); QString in_str(""); HuffmanString huff(in_str, &set); BOOST_REQUIRE_EQUAL(huff, in_str); }
