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:
ell
2023-10-04 14:43:44 +01:00
parent 03b6b9ff13
commit 19df8040df
32 changed files with 3667 additions and 0 deletions
+28
View File
@@ -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