Files
love/testing/tests/thread.lua
T
ell 19df8040df 0.1
Initial commit of a basic test framework, see readme.md for more

Most modules are covered with basic unit tests, and there's an example test for a graphics draw (rectangle) and object (File) - for object tests doing more scenario based so we can check multiple things together
2023-10-04 14:43:44 +01:00

28 lines
769 B
Lua

-- love.thread
-- love.thread.getChannel
-- @NOTE this is just basic nil checking, full obj test are in objects.lua
love.test.thread.getChannel = function(test)
local channel = love.thread.getChannel('test')
test:assertObject(channel)
channel:release()
end
-- love.thread.newChannel
-- @NOTE this is just basic nil checking, full obj test are in objects.lua
love.test.thread.newChannel = function(test)
local channel = love.thread.newChannel()
test:assertObject(channel)
channel:release()
end
-- love.thread.newThread
-- @NOTE this is just basic nil checking, full obj test are in objects.lua
love.test.thread.newThread = function(test)
local thread = love.thread.newThread('classes/TestSuite.lua')
test:assertObject(thread)
thread:release()
end