fixed zlib compression test
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -91,7 +91,7 @@
|
|||||||
#undef TEST_ALL
|
#undef TEST_ALL
|
||||||
static const bool TEST_ALL = TRUE;
|
static const bool TEST_ALL = TRUE;
|
||||||
#else
|
#else
|
||||||
#define TEST_ARRAYS
|
#define TEST_ZLIB
|
||||||
|
|
||||||
static const bool TEST_ALL = FALSE;
|
static const bool TEST_ALL = FALSE;
|
||||||
#endif
|
#endif
|
||||||
@@ -3581,16 +3581,16 @@ static void TestZipFileSystem()
|
|||||||
#include "wx/wfstream.h"
|
#include "wx/wfstream.h"
|
||||||
|
|
||||||
static const wxChar *FILENAME_GZ = _T("test.gz");
|
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()
|
static void TestZlibStreamWrite()
|
||||||
{
|
{
|
||||||
puts("*** Testing Zlib stream reading ***\n");
|
puts("*** Testing Zlib stream reading ***\n");
|
||||||
|
|
||||||
wxFileOutputStream fileOutStream(FILENAME_GZ);
|
wxFileOutputStream fileOutStream(FILENAME_GZ);
|
||||||
wxZlibOutputStream ostr(fileOutStream, 0);
|
wxZlibOutputStream ostr(fileOutStream);
|
||||||
printf("Compressing the test string... ");
|
printf("Compressing the test string... ");
|
||||||
ostr.Write(TEST_DATA, sizeof(TEST_DATA));
|
ostr.Write(TEST_DATA, strlen(TEST_DATA) + 1);
|
||||||
if ( !ostr )
|
if ( !ostr )
|
||||||
{
|
{
|
||||||
puts("(ERROR: failed)");
|
puts("(ERROR: failed)");
|
||||||
|
Reference in New Issue
Block a user