mirror of
https://github.com/love2d/love.git
synced 2026-08-12 00:20:52 +02:00
tests: add waitSeconds method
This commit is contained in:
@@ -372,6 +372,14 @@ TestMethod = {
|
||||
end,
|
||||
|
||||
|
||||
waitSeconds = function(self, seconds)
|
||||
local start = love.timer.getTime()
|
||||
while love.timer.getTime() < start + seconds do
|
||||
coroutine.yield()
|
||||
end
|
||||
end,
|
||||
|
||||
|
||||
-- @method - TestMethod:evaluateTest()
|
||||
-- @desc - evaluates the results of all assertions for a final restult
|
||||
-- @return {nil}
|
||||
|
||||
Reference in New Issue
Block a user