diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2015-03-19 00:05:59 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2015-03-19 00:05:59 (GMT) |
commit | 86715b2541fc1fa70d66c0b6aa723685a61e6f56 (patch) | |
tree | 31dfa883f8618d308edb9b59a0b998b57c33a39b /programs | |
parent | 7ee725645b58c201f11443d70210c2f986371b59 (diff) | |
download | lz4-86715b2541fc1fa70d66c0b6aa723685a61e6f56.zip lz4-86715b2541fc1fa70d66c0b6aa723685a61e6f56.tar.gz lz4-86715b2541fc1fa70d66c0b6aa723685a61e6f56.tar.bz2 |
Some more tests related to frame content size
Diffstat (limited to 'programs')
-rw-r--r-- | programs/frametest.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/programs/frametest.c b/programs/frametest.c index 96ac3f9..2a087ec 100644 --- a/programs/frametest.c +++ b/programs/frametest.c @@ -582,6 +582,7 @@ int fuzzerTests(U32 seed, unsigned nbTests, unsigned startTest, double compressi unsigned nbBits = (FUZ_rand(&randState) % (FUZ_highbit(srcDataLength-1) - 1)) + 1; size_t srcSize = (FUZ_rand(&randState) & ((1<<nbBits)-1)) + 1; size_t srcStart = FUZ_rand(&randState) % (srcDataLength - srcSize); + U64 frameContentSize = ((FUZ_rand(&randState) & 0xF) == 1) ? srcSize : 0; size_t cSize; U64 crcOrig, crcDecoded; LZ4F_preferences_t* prefsPtr = &prefs; @@ -593,6 +594,7 @@ int fuzzerTests(U32 seed, unsigned nbTests, unsigned startTest, double compressi prefs.frameInfo.blockMode = (blockMode_t)BMId; prefs.frameInfo.blockSizeID = (blockSizeID_t)BSId; prefs.frameInfo.contentChecksumFlag = (contentChecksum_t)CCflag; + prefs.frameInfo.frameOSize = frameContentSize; prefs.autoFlush = autoflush; prefs.compressionLevel = FUZ_rand(&randState) % 5; if ((FUZ_rand(&randState) & 0xF) == 1) prefsPtr = NULL; |