Browse Source

tests: add some tolerance to video rewind test

It happens while the video is still playing, so the tell() query after the rewind isn't guaranteed to be 0.
Sasha Szpakowski 1 year ago
parent
commit
b7e576efa8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      testing/tests/video.lua

+ 1 - 1
testing/tests/video.lua

@@ -25,7 +25,7 @@ love.test.video.VideoStream = function(test)
   video:seek(0.3)
   test:assertRange(video:tell(), 0.3, 0.4, 'check seek/tell')
   video:rewind()
-  test:assertEquals(0, video:tell(), 'check rewind')
+  test:assertRange(video:tell(), 0, 0.1, 'check rewind')
   video:pause()
   test:assertFalse(video:isPlaying(), 'check paused')