Skip to content

Commit

Permalink
tests: add some tolerance to video rewind test
Browse files Browse the repository at this point in the history
It happens while the video is still playing, so the tell() query after the rewind isn't guaranteed to be 0.
  • Loading branch information
slime73 committed Dec 14, 2023
1 parent 12b24c3 commit b7e576e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testing/tests/video.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit b7e576e

Please sign in to comment.