]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed zlib compression test
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 11 May 2002 15:09:10 +0000 (15:09 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 11 May 2002 15:09:10 +0000 (15:09 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/console/console.cpp

index 0bca4581a549253507e798bc68fed4e49fb5fb3d..cc732582d4d8a18a7c1ababbb4de14aafa4b02c4 100644 (file)
@@ -91,7 +91,7 @@
     #undef TEST_ALL
     static const bool TEST_ALL = TRUE;
 #else
-    #define TEST_ARRAYS
+    #define TEST_ZLIB
 
     static const bool TEST_ALL = FALSE;
 #endif
@@ -3581,16 +3581,16 @@ static void TestZipFileSystem()
 #include "wx/wfstream.h"
 
 static const wxChar *FILENAME_GZ = _T("test.gz");
-static const char *TEST_DATA = "hello and hello again";
+static const char *TEST_DATA = "hello and hello and hello and hello and hello";
 
 static void TestZlibStreamWrite()
 {
     puts("*** Testing Zlib stream reading ***\n");
 
     wxFileOutputStream fileOutStream(FILENAME_GZ);
-    wxZlibOutputStream ostr(fileOutStream, 0);
+    wxZlibOutputStream ostr(fileOutStream);
     printf("Compressing the test string... ");
-    ostr.Write(TEST_DATA, sizeof(TEST_DATA));
+    ostr.Write(TEST_DATA, strlen(TEST_DATA) + 1);
     if ( !ostr )
     {
         puts("(ERROR: failed)");