diff options
author | Pixel <pixel@nobis-crew.org> | 2011-12-04 01:19:09 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-12-04 01:20:10 -0800 |
commit | d440c3f50a918a932293ad98bcec96eaa4683222 (patch) | |
tree | 33e8e42a8e4506ae9da70cdb44dd133bde7f7219 /tests/test-Lua.cc | |
parent | e5577eb7a643ce7885e5d14660a6d24254161622 (diff) |
Reworked some things in the architecture, mainly exceptions and asserts.
-) Removed Assert()
-) Added AAssert(), IAssert(), RAssert(), TAssert() and Failure()
-) Reworked all asserts in the code, and added meaningful messages to them.
-) Changed the way the startup code is generated; BALAU_STARTUP is no longer necessary.
Diffstat (limited to 'tests/test-Lua.cc')
-rw-r--r-- | tests/test-Lua.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/test-Lua.cc b/tests/test-Lua.cc index 86baffb..8ba3785 100644 --- a/tests/test-Lua.cc +++ b/tests/test-Lua.cc @@ -1,8 +1,6 @@ #include <Main.h> #include <BLua.h> -BALAU_STARTUP; - using namespace Balau; void MainTask::Do() { @@ -11,7 +9,7 @@ void MainTask::Do() { Lua L; // yeah, they really should be the same thing. - Assert(sizeof(L) == sizeof(lua_State *)); + TAssert(sizeof(L) == sizeof(lua_State *)); L.open_base(); L.open_table(); @@ -21,13 +19,13 @@ void MainTask::Do() { L.open_bit(); L.open_jit(); - Assert(L.gettop() == 0); + TAssert(L.gettop() == 0); L.load("return 42"); - Assert(L.gettop() == 1); + TAssert(L.gettop() == 1); int r = L.tonumber(); - Assert(r == 42); + TAssert(r == 42); L.pop(); - Assert(L.gettop() == 0); + TAssert(L.gettop() == 0); Printer::log(M_STATUS, "Test::Lua passed."); } |