diff options
Diffstat (limited to 'unit_tests/shared.cpp')
-rw-r--r-- | unit_tests/shared.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/unit_tests/shared.cpp b/unit_tests/shared.cpp index 73aeadd..023e917 100644 --- a/unit_tests/shared.cpp +++ b/unit_tests/shared.cpp | |||
@@ -101,7 +101,9 @@ namespace | |||
101 | TEST_CASE("lanes.stack checker") | 101 | TEST_CASE("lanes.stack checker") |
102 | { | 102 | { |
103 | LuaState _L{ LuaState::WithBaseLibs{ true }, LuaState::WithFixture{ false } }; | 103 | LuaState _L{ LuaState::WithBaseLibs{ true }, LuaState::WithFixture{ false } }; |
104 | #if HAVE_LUA_ASSERT() | ||
104 | StackChecker::CallsCassert = false; | 105 | StackChecker::CallsCassert = false; |
106 | #endif // HAVE_LUA_ASSERT() | ||
105 | 107 | ||
106 | auto _doStackCheckerTest = [&_L](lua_CFunction const _f, LuaError const _expected) { | 108 | auto _doStackCheckerTest = [&_L](lua_CFunction const _f, LuaError const _expected) { |
107 | lua_pushcfunction(_L, _f); | 109 | lua_pushcfunction(_L, _f); |
@@ -223,7 +225,7 @@ std::string_view LuaState::doStringAndRet(std::string_view const& str_) const | |||
223 | STACK_CHECK(L, 1); // the error message is on the stack | 225 | STACK_CHECK(L, 1); // the error message is on the stack |
224 | return ""; | 226 | return ""; |
225 | } | 227 | } |
226 | LuaError const _callErr{ lua_pcall(L, 0, 1, 0) }; // L: "<msg>"?|retstring | 228 | [[maybe_unused]] LuaError const _callErr{ lua_pcall(L, 0, 1, 0) }; // L: "<msg>"?|retstring |
227 | STACK_CHECK(L, 1); | 229 | STACK_CHECK(L, 1); |
228 | return luaG_tostring(L, kIdxTop); | 230 | return luaG_tostring(L, kIdxTop); |
229 | } | 231 | } |