Mercurial > dedupe
view TestHuffmanString.cpp @ 21:3bcdb8bb6914
Huffman representations.
| author | Tom Fredrik Blenning Klaussen <bfg@blenning.no> |
|---|---|
| date | Wed, 05 Sep 2012 21:54:53 +0200 |
| parents | |
| children | bf3dce7fedcb |
line wrap: on
line source
#include "HuffmanString.hpp" #include "TestFramework.hpp" #include <QtCore/QDebug> 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); } } }
