diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2016-03-26 17:12:52 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2016-03-26 17:20:27 +0900 |
| commit | d64089632e82a2548752c7a6baaa68365a795a74 (patch) | |
| tree | 57fc7b85a8c1290975d58fa4761b04a7695bf7e3 /test/GZipDecoderTest.cc | |
| parent | c81b1321122e8509b55c94c0cbca0d8d6d319f0c (diff) | |
| parent | a7cd943a06b1a5ff4515b57060b84037f8d01f9f (diff) | |
Merge branch 'master' into random-webseeding
Diffstat (limited to 'test/GZipDecoderTest.cc')
| -rw-r--r-- | test/GZipDecoderTest.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/GZipDecoderTest.cc b/test/GZipDecoderTest.cc index 1d969251..3e9a7636 100644 --- a/test/GZipDecoderTest.cc +++ b/test/GZipDecoderTest.cc @@ -12,11 +12,12 @@ namespace aria2 { -class GZipDecoderTest:public CppUnit::TestFixture { +class GZipDecoderTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(GZipDecoderTest); CPPUNIT_TEST(testDecode); CPPUNIT_TEST_SUITE_END(); + public: void setUp() {} @@ -25,7 +26,6 @@ public: void testDecode(); }; - CPPUNIT_TEST_SUITE_REGISTRATION(GZipDecoderTest); void GZipDecoderTest::testDecode() @@ -33,16 +33,16 @@ void GZipDecoderTest::testDecode() GZipDecoder decoder; decoder.init(); - std::string outfile(A2_TEST_OUT_DIR"/aria2_GZipDecoderTest_testDecode"); + std::string outfile(A2_TEST_OUT_DIR "/aria2_GZipDecoderTest_testDecode"); char buf[4_k]; - std::ifstream in(A2_TEST_DIR"/gzip_decode_test.gz", std::ios::binary); + std::ifstream in(A2_TEST_DIR "/gzip_decode_test.gz", std::ios::binary); std::ofstream out(outfile.c_str(), std::ios::binary); - while(in) { + while (in) { in.read(buf, sizeof(buf)); - std::string r = decoder.decode - (reinterpret_cast<const unsigned char*>(buf), in.gcount()); + std::string r = decoder.decode(reinterpret_cast<const unsigned char*>(buf), + in.gcount()); out.write(r.data(), r.size()); } |
