From 1aaece897e3f75ce02cef89dce69928f9df7318b Mon Sep 17 00:00:00 2001 From: Daniel Wallin Date: Tue, 9 Sep 2008 14:14:00 +0200 Subject: [PATCH] Always check the stack state after each test. We were checking the stack state when the lua_State wrapper destructed, but in case of failure the test would still pass. This change fixes that. --- test/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/main.cpp b/test/main.cpp index 047a284..3152c73 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -66,7 +66,6 @@ lua_state::lua_state() lua_state::~lua_state() { - TEST_CHECK(lua_gettop(m_state) == m_top); lua_close(m_state); } @@ -120,6 +119,7 @@ int main() try { test_main(L); + L.check(); return tests_failure ? 1 : 0; } catch (luabind::error const& e) -- 2.11.4.GIT