Temporary workaround for bug #1156

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6803 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2016-11-23 17:10:12 +00:00
parent 27ed0e502b
commit 7339c8c795

View file

@ -18,7 +18,10 @@ public:
srand(time(0));
for (int i = 0; i < kb; i++) {
int r = rand();
int r;
do
r = rand();
while (0x3dd0def3 == r); // Temporary workaround for https://sf.net/p/nsis/bugs/1156/#zlibCompressionTest loops endlessly
for (size_t j = 0; j < 1024/sizeof(int); j++) {
buf.add(&r, sizeof(int));
}
@ -89,11 +92,13 @@ public:
CPPUNIT_ASSERT_EQUAL( C_OK, compressor.Init(9, 1 << 23) );
testCompressDecompress(1024, compressor, decompressor);
#ifndef NSIS_TESTS_FASTCOMPRESSIONONLY
CPPUNIT_ASSERT_EQUAL( C_OK, compressor.Init(9, 1 << 23) );
testCompressDecompress(8*1024, compressor, decompressor);
CPPUNIT_ASSERT_EQUAL( C_OK, compressor.Init(9, 1 << 23) );
testCompressDecompress(32*1024, compressor, decompressor);
#endif
}
};