fix border case in test definition
there was the possibility for the random offset added in this test to add up to a whole frame, which would cause the re-quantisation to wrap to the next fame (and thus the CHECK in line 110 to fail.
This commit is contained in:
parent
25be40bb4a
commit
d8d4db3544
1 changed files with 3 additions and 1 deletions
|
|
@ -103,8 +103,10 @@ namespace test {
|
|||
Time point (myGrid->timeOf (randomFrame));
|
||||
CHECK (point == testOrigin + randomFrame * testFps.duration());
|
||||
|
||||
uint fract = 1 + rand() % DIRT_GRAIN;
|
||||
uint fract = 2 + rand() % DIRT_GRAIN;
|
||||
FSecs dirt = rational_cast<FSecs> (1 / testFps / fract);
|
||||
ASSERT (Time(dirt) < testFps.duration());
|
||||
ASSERT (0 < dirt);
|
||||
|
||||
Time dirty(point + Time(dirt));
|
||||
CHECK (point == testOrigin + myGrid->gridAlign(dirty));
|
||||
|
|
|
|||
Loading…
Reference in a new issue