Improve unit test
This commit is contained in:
parent
4d4fd2c55f
commit
1a8af0de73
@ -2497,7 +2497,6 @@ static void ZSTD_copyBlockSequences(ZSTD_CCtx* zc)
|
||||
|
||||
ZSTD_Sequence* outSeqs = &zc->seqCollector.seqStart[zc->seqCollector.seqIndex];
|
||||
size_t i;
|
||||
int repIdx;
|
||||
U32 rep[ZSTD_REP_NUM];
|
||||
U32 shouldUpdateRep;
|
||||
|
||||
@ -2561,8 +2560,9 @@ static void ZSTD_copyBlockSequences(ZSTD_CCtx* zc)
|
||||
}
|
||||
outSeqs[i].offset = rawOffset;
|
||||
if (shouldUpdateRep) {
|
||||
for (int i = ZSTD_REP_NUM - 1; i > 0; i--) {
|
||||
rep[i] = rep[i - 1];
|
||||
int j;
|
||||
for (j = ZSTD_REP_NUM - 1; j > 0; j--) {
|
||||
rep[j] = rep[j - 1];
|
||||
}
|
||||
rep[0] = outSeqs[i].offset;
|
||||
}
|
||||
|
@ -2723,7 +2723,7 @@ static int basicUnitTests(U32 const seed, double compressibility)
|
||||
assert(cctx != NULL);
|
||||
|
||||
/* Populate src with random data */
|
||||
RDG_genBuffer(CNBuffer, srcSize, compressibility, 0., seed);
|
||||
RDG_genBuffer(CNBuffer, srcSize, compressibility, 0.5, seed);
|
||||
|
||||
/* Test with block delimiters roundtrip */
|
||||
seqsSize = ZSTD_generateSequences(cctx, seqs, srcSize, src, srcSize);
|
||||
|
Loading…
Reference in New Issue
Block a user