mirror of
https://github.com/love2d/love.git
synced 2026-08-12 16:40:57 +02:00
19df8040df
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
28 lines
769 B
Lua
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 |