]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/streams/zlibstream.cpp
ActiveX events should be sent to the window, not it's parent.
[wxWidgets.git] / tests / streams / zlibstream.cpp
index d7c0424d156e0ab42e03f676447011aebf028686..f70ff1e0e20d06eab8de2c0c90a6cf850efbf2be 100644 (file)
@@ -87,7 +87,9 @@ public:
         WXTEST_WITH_GZIP_CONDITION(TestStream_GZip_BestComp);
         WXTEST_WITH_GZIP_CONDITION(TestStream_ZLibGZip);
         CPPUNIT_TEST(Decompress_BadData);
+#if WXWIN_COMPATIBILITY_2_4
         CPPUNIT_TEST(Decompress_wx24Data);
+#endif
         CPPUNIT_TEST(Decompress_wx251_zlib114_Data_NoHeader);
         CPPUNIT_TEST(Decompress_wx251_zlib114_Data_ZLib);
         WXTEST_WITH_GZIP_CONDITION(Decompress_gzip135Data);
@@ -113,7 +115,9 @@ protected:
     // Decompress data that was compress by an external app. 
     // (like test wx 2.4.2, 2.5.1 and gzip data)
     // Note: This test is limited in testing range!
+#if WXWIN_COMPATIBILITY_2_4
     void Decompress_wx24Data();
+#endif
     void Decompress_wx251_zlib114_Data_NoHeader();
     void Decompress_wx251_zlib114_Data_ZLib();
     void Decompress_gzip135Data();    
@@ -255,6 +259,7 @@ void zlibStream::Decompress_BadData()
     CPPUNIT_ASSERT(!zstream_in.IsOk());
 }
 
+#if WXWIN_COMPATIBILITY_2_4
 void zlibStream::Decompress_wx24Data()
 {
     // The wx24_value was used in a wxWidgets 2.4(.2) 
@@ -268,6 +273,7 @@ void zlibStream::Decompress_wx24Data()
     // Perform a generic data test on the data.
     doDecompress_ExternalData(wx24_data, wx24_value, data_size, value_size, wxZLIB_24COMPATIBLE);
 }
+#endif
 
 void zlibStream::Decompress_wx251_zlib114_Data_NoHeader()
 {
@@ -330,9 +336,9 @@ const unsigned char *zlibStream::GetCompressedData()
 
 void zlibStream::doTestStreamData(int input_flag, int output_flag, int compress_level)
 {
-    size_t fail_pos = 0;
+    size_t fail_pos;
     char last_value = 0;
-    bool bWasEOF = true;
+    bool bWasEOF;
 
     {   // Part one: Create a compressed file.
         wxFileOutputStream fstream_out(FILENAME_GZ);
@@ -395,7 +401,9 @@ void zlibStream::doDecompress_ExternalData(const unsigned char *data, const char
     {
     case wxZLIB_NO_HEADER:
         break;
+#if WXWIN_COMPATIBILITY_2_4
     case wxZLIB_24COMPATIBLE:
+#endif
     case wxZLIB_ZLIB:
         if (!(data_size >= 1 && data[0] == 0x78))
             wxLogError(_T("zlib data seems to not be zlib data!"));
@@ -503,8 +511,8 @@ void zlibStream::DoDeleteOutStream()
 
 void zlibStream::genExtTestData(wxTextOutputStream &out, const char *buf, int flag)
 {
-    unsigned char *data = NULL;
-    size_t size = 0;
+    unsigned char *data;
+    size_t size;
     
     {   // Gen data
         wxMemoryOutputStream memstream_out;