| 27 | namespace |
| 28 | { |
| 29 | void TestDeflateInflate(string const & original) |
| 30 | { |
| 31 | for (auto const & p : g_combinations) |
| 32 | { |
| 33 | Deflate const deflate(p.first /* format */, Deflate::Level::BestCompression); |
| 34 | Inflate const inflate(p.second /* format */); |
| 35 | |
| 36 | string compressed; |
| 37 | TEST(deflate(original, back_inserter(compressed)), ()); |
| 38 | |
| 39 | string decompressed; |
| 40 | TEST(inflate(compressed, back_inserter(decompressed)), ()); |
| 41 | |
| 42 | TEST_EQUAL(original, decompressed, ()); |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | UNIT_TEST(ZLib_Smoke) |
| 47 | { |