mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
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
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
-- 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
|
||||
Reference in New Issue
Block a user