Home | History | Annotate | Download | only in tests

Lines Matching refs:FUZ_rand

111 unsigned int FUZ_rand(unsigned int* src)
122 #define FUZ_RAND15BITS (FUZ_rand(seed) & 0x7FFF)
123 #define FUZ_RANDLENGTH ( (FUZ_rand(seed) & 3) ? (FUZ_rand(seed) % 15) : (FUZ_rand(seed) % 510) + 15)
131 BBuffer[pos++] = (BYTE)(FUZ_rand(seed));
149 while (pos < end) BBuffer[pos++] = (BYTE)(FUZ_rand(seed) >> 5);
355 unsigned const nbBits = FUZ_rand(&randState) % maxBits;
356 size_t iSize = (FUZ_rand(&randState) & ((1<<nbBits)-1)) + 1;
480 unsigned nbBits = FUZ_rand(&randState) % maxBits;
481 size_t iSize = (FUZ_rand(&randState) & ((1<<nbBits)-1)) + 1;
500 unsigned nbBits = FUZ_rand(&randState) % maxBits;
501 size_t iSize = (FUZ_rand(&randState) & ((1<<nbBits)-1)) + 1;
591 for (testNb =0; (testNb < startTest); testNb++) (void)FUZ_rand(&coreRand); /* sync randomizer */
596 unsigned const srcBits = (FUZ_rand(&randState) % (FUZ_highbit((U32)(srcDataLength-1)) - 1)) + 1;
597 size_t const srcSize = (FUZ_rand(&randState) & ((1<<srcBits)-1)) + 1;
598 size_t const srcStartId = FUZ_rand(&randState) % (srcDataLength - srcSize);
600 unsigned const neverFlush = (FUZ_rand(&randState) & 15) == 1;
606 (void)FUZ_rand(&coreRand); /* update seed */
608 prefs.frameInfo.blockMode = (LZ4F_blockMode_t)(FUZ_rand(&randState) & 1);
609 prefs.frameInfo.blockSizeID = (LZ4F_blockSizeID_t)(4 + (FUZ_rand(&randState) & 3));
610 prefs.frameInfo.contentChecksumFlag = (LZ4F_contentChecksum_t)(FUZ_rand(&randState) & 1);
611 prefs.frameInfo.contentSize = ((FUZ_rand(&randState) & 0xF) == 1) ? srcSize : 0;
612 prefs.autoFlush = neverFlush ? 0 : (FUZ_rand(&randState) & 7) == 2;
613 prefs.compressionLevel = FUZ_rand(&randState) % 5;
614 if ((FUZ_rand(&randState) & 0xF) == 1) prefsPtr = NULL;
618 if ((FUZ_rand(&randState) & 0xFFF) == 0) {
621 FUZ_writeLE32(op, LZ4F_MAGIC_SKIPPABLE_START + (FUZ_rand(&randState) & 15));
624 } else if ((FUZ_rand(&randState) & 0xF) == 2) { /* single pass compression (simple) */
639 unsigned const nbBitsSeg = FUZ_rand(&randState) % maxBits;
640 size_t const sampleMax = (FUZ_rand(&randState) & ((1<<nbBitsSeg)-1)) + 1;
643 cOptions.stableSrc = ((FUZ_rand(&randState) & 3) == 1);
650 { unsigned const forceFlush = neverFlush ? 0 : ((FUZ_rand(&randState) & 3) == 1);
672 unsigned const nonContiguousDst = FUZ_rand(&randState) % 3; /* 0 : contiguous; 1 : non-contiguous; 2 : dst overwritten */
677 unsigned const nbBitsI = (FUZ_rand(&randState) % (maxBits-1)) + 1;
678 unsigned const nbBitsO = (FUZ_rand(&randState) % (maxBits)) + 1;
679 size_t const iSizeMax = (FUZ_rand(&randState) & ((1<<nbBitsI)-1)) + 1;
681 size_t const oSizeMax = (FUZ_rand(&randState) & ((1<<nbBitsO)-1)) + 2;
685 dOptions.stableDst = FUZ_rand(&randState) & 1;