multi/tests/runtests.lua

46 lines
1.3 KiB
Lua

package.path="multi/?.lua;multi/?/init.lua;multi/?.lua;multi/?/?/init.lua;"..package.path
require("lldebugger").start()
--[[
This file runs all tests.
Format:
Expected:
...
...
...
Actual:
...
...
...
Each test that is ran should have a 5 second pause after the test is complete
The expected and actual should "match" (Might be impossible when playing with threads)
This will be pushed directly to the master as tests start existing.
]]
os.execute("cd multi")
os.execute("pwd")
local multi, thread = require("multi"):init{priority=true}
local good = false
runTest = thread:newFunction(function()
-- thread.sleep(1)
-- local objects = multi:newProcessor("Basic Object Tests")
-- objects.OnError(function(...)
-- print("Error: ",...)
-- end)
-- objects.Start()
-- require("tests/objectTests")(objects,thread)
-- objects.Stop()
local conn_thread = multi:newProcessor("Connection/Thread Tests")
conn_thread.OnError(function(...)
print("Error: ",...)
end)
conn_thread.Start()
require("tests/connectionTest")(conn_thread,thread)
conn_thread.Stop()
--print(multi:getTasksDetails())
os.exit()
end)
runTest().OnError(function(...)
print("Error:",...)
end)
multi:mainloop()