From d440c3f50a918a932293ad98bcec96eaa4683222 Mon Sep 17 00:00:00 2001 From: Pixel Date: Sun, 4 Dec 2011 01:19:09 -0800 Subject: 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. --- tests/test-Lua.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'tests/test-Lua.cc') 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 #include -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."); } -- cgit v1.2.3