From babb39375916dc114d3413aa52c9a2c543cad2af Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Tue, 30 Jul 2013 18:26:05 -0700 Subject: Tweaking the basic Lua test a bit. --- tests/test-Lua.cc | 8 +++++++- tests/test-Lua.lua | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 tests/test-Lua.lua diff --git a/tests/test-Lua.cc b/tests/test-Lua.cc index 60d9239..724369f 100644 --- a/tests/test-Lua.cc +++ b/tests/test-Lua.cc @@ -1,5 +1,6 @@ #include #include +#include using namespace Balau; @@ -116,7 +117,7 @@ int sLua_ObjectTest::ObjectTest_proceed_statics(Lua & L, int n, int caller) thro if (evt) delete evt; evt = NULL; - if (y < 5) { + if (y < 2) { evt = new Events::Timeout(0.1f); throw EAgain(evt); } @@ -194,6 +195,11 @@ void MainTask::Do() { } TAssert(L.gettop() == 0); + IO i = new Input("tests/test-Lua.lua"); + i->open(); + L.load(i); + TAssert(L.gettop() == 0); + TAssert(objGotDestroyed == 0); L.load("obj2 = createObjectTest() obj2:destroy()"); TAssert(objGotDestroyed == 1); diff --git a/tests/test-Lua.lua b/tests/test-Lua.lua new file mode 100644 index 0000000..53289a8 --- /dev/null +++ b/tests/test-Lua.lua @@ -0,0 +1 @@ +print "foo" -- cgit v1.2.3