Hi, I would like to see how Solar2D is related to the error function from Lua, I'm using the luaunit framework to add tests into my app but it looks like is having problems at running the error function from Lua and it just stops working without triggering any error, the library is not being able to catch something to throw.
local lu = require("luaunit")
test_Luaunit = {}
function test_Luaunit:test_NoErrorDetection()
print("Testing no error triggering\n")
lu.assertEquals(true, true)
end
-- Try to comment this function test to see how it is supposed to work
function test_Luaunit:test_ErrorDetection()
print("Testing error function triggering\n")
lu.assertEquals(true, false)
end
local runner = lu.LuaUnit.new()
runner:runSuite()
This is the same script running in a pure lua interpreter:
And this is in the Corona Simulator:
The library inside is running the "error()" function because the assert failed, after running the assert in the second test everything is just dead.
I think the error function is being used somehow by Solar2D and is messing with how it should work in pure Lua.
Is there a way to control how the error function works?
Thanks in advance!
Hi, I would like to see how Solar2D is related to the error function from Lua, I'm using the luaunit framework to add tests into my app but it looks like is having problems at running the error function from Lua and it just stops working without triggering any error, the library is not being able to catch something to throw.
This is the same script running in a pure lua interpreter:
And this is in the Corona Simulator:
The library inside is running the "error()" function because the assert failed, after running the assert in the second test everything is just dead.
I think the error function is being used somehow by Solar2D and is messing with how it should work in pure Lua.
Is there a way to control how the error function works? Thanks in advance!