X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7735998c2a8bf66e7cc57fb3d46c065bc814d8b6..85ac8ca017a0409e9762ed305ccc1d32a7c28fa7:/tests/streams/zlibstream.cpp diff --git a/tests/streams/zlibstream.cpp b/tests/streams/zlibstream.cpp index d7c0424d15..f70ff1e0e2 100644 --- a/tests/streams/zlibstream.cpp +++ b/tests/streams/zlibstream.cpp @@ -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;