Zipios++
zipoutputstreamtest.h
1 #ifndef ZIPIOS_ZIPOUTPUTSTREAMTEST_H
2 #define ZIPIOS_ZIPOUTPUTSTREAMTEST_H
3 
4 #include <string>
5 #include <vector>
6 
7 #include <cppunit/TestCase.h>
8 #include <cppunit/TestSuite.h>
9 #include <cppunit/TestAssert.h>
10 #include <cppunit/extensions/HelperMacros.h>
11 
12 #include "commontest.h"
14 
15 namespace zipios {
16 
17  using std::string;
18  using std::vector;
19  using std::istream;
20 
21  class ZipOutputStreamTest : public CppUnit::TestCase {
22  public:
23  CPPUNIT_TEST_SUITE(ZipOutputStreamTest);
24  CPPUNIT_TEST(testNativeUnzip);
25  CPPUNIT_TEST_SUITE_END();
26 
27  void testNativeUnzip();
28 
29  private:
30  static bool hasUnzip();
31  static void entryToFile(const string &ent_name, istream &is,
32  const string &outfile,
33  bool cerr_report);
34  static void writeFileToZipOutputStream(zipios::ZipOutputStream& zos,
35  const std::string& entryName);
36 
37  static void assertEntry(const std::string& zipFileName,
38  const std::string& entryName);
39 
40  static const std::string TEST_ZIPFILE_NAME;
41 
42  static const TestFiles TEST_FILES;
43  };
44 
45 } // zipios
46 
47 #endif
Header file that defines ZipOutputStream.