summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2017-12-22 11:47:59 (GMT)
committerYann Collet <cyan@fb.com>2017-12-22 11:47:59 (GMT)
commit7d2f30c7d1519a3a4a199e398e13d9baa21bf84e (patch)
tree68e816073fbde339262fdee0ebcb35222357ab07 /tests
parentfdde4311fb47332d81f2fa84a06e5605e6b68600 (diff)
downloadlz4-7d2f30c7d1519a3a4a199e398e13d9baa21bf84e.zip
lz4-7d2f30c7d1519a3a4a199e398e13d9baa21bf84e.tar.gz
lz4-7d2f30c7d1519a3a4a199e398e13d9baa21bf84e.tar.bz2
lz4opt supports _destSize
no longer limited to level 9
Diffstat (limited to 'tests')
-rw-r--r--tests/fuzzer.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/fuzzer.c b/tests/fuzzer.c
index 365ff79..c134fe3 100644
--- a/tests/fuzzer.c
+++ b/tests/fuzzer.c
@@ -345,10 +345,9 @@ static int FUZ_test(U32 seed, U32 nbCycles, const U32 startCycle, const double c
FUZ_CHECKTEST(crcDec!=crcBase, "LZ4_decompress_safe() corrupted decoded data"); }
DISPLAYLEVEL(5, " OK \n");
- }
- else
+ } else {
DISPLAYLEVEL(5, " \n");
- }
+ } }
/* Test compression HC destSize */
FUZ_DISPLAYTEST;
@@ -359,11 +358,14 @@ static int FUZ_test(U32 seed, U32 nbCycles, const U32 startCycle, const double c
FUZ_CHECKTEST(ctx==NULL, "LZ4_createHC() allocation failed");
compressedBuffer[targetSize] = endCheck;
ret = LZ4_compress_HC_destSize(ctx, block, compressedBuffer, &srcSize, targetSize, compressionLevel);
+ DISPLAYLEVEL(5, "LZ4_compress_HC_destSize(%i): destSize : %7i/%7i; content%7i/%7i ",
+ compressionLevel, ret, targetSize, srcSize, blockSize);
LZ4_freeHC(ctx);
FUZ_CHECKTEST(ret > targetSize, "LZ4_compress_HC_destSize() result larger than dst buffer !");
FUZ_CHECKTEST(compressedBuffer[targetSize] != endCheck, "LZ4_compress_HC_destSize() overwrite dst buffer !");
FUZ_CHECKTEST(srcSize > blockSize, "LZ4_compress_HC_destSize() fed more than src buffer !");
- DISPLAYLEVEL(5, "destSize : %7i/%7i; content%7i/%7i ", ret, targetSize, srcSize, blockSize);
+ DISPLAYLEVEL(5, "LZ4_compress_HC_destSize(%i): destSize : %7i/%7i; content%7i/%7i ",
+ compressionLevel, ret, targetSize, srcSize, blockSize);
if (targetSize>0) {
/* check correctness */
U32 const crcBase = XXH32(block, srcSize, 0);
@@ -380,10 +382,9 @@ static int FUZ_test(U32 seed, U32 nbCycles, const U32 startCycle, const double c
FUZ_CHECKTEST(crcDec!=crcBase, "LZ4_decompress_safe() corrupted decoded data");
}
DISPLAYLEVEL(5, " OK \n");
- }
- else
+ } else {
DISPLAYLEVEL(5, " \n");
- }
+ } }
/* Test compression HC */
FUZ_DISPLAYTEST;