Skip to content

Commit

Permalink
Fix more issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kunitoki committed Sep 27, 2024
1 parent 1c34733 commit c3d96b6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Tests/Source/ClassExtensibleTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ TEST_F(ClassExtensibleTests, MetatableSecurity)
}
}

#if ! LUABRIDGE_TEST_LUAU && LUABRIDGE_TEST_LUA_VERSION >= 502
#if ! LUABRIDGE_ON_LUAU && LUA_VERSION_NUM >= 502
TEST_F(ClassExtensibleTests, MetatablePrinting)
{
luabridge::getGlobalNamespace(L)
Expand Down
6 changes: 3 additions & 3 deletions Tests/Source/CoroutineTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
namespace {
int lua_resume_x(lua_State* L, int nargs)
{
#if LUABRIDGE_TEST_LUAJIT || LUA_VERSION_NUM == 501
#if LUABRIDGE_ON_LUAJIT || LUA_VERSION_NUM == 501
return lua_resume(L, nargs);
#elif LUABRIDGE_TEST_LUAU || LUABRIDGE_TEST_RAVI || LUA_VERSION_NUM < 504
#elif LUABRIDGE_ON_LUAU || LUABRIDGE_ON_RAVI || LUA_VERSION_NUM < 504
return lua_resume(L, nullptr, nargs);
#else
[[maybe_unused]] int nresults = 0;
Expand Down Expand Up @@ -163,7 +163,7 @@ TEST_F(CoroutineTests, ThreadedRegistration)
auto env = luaL_ref(thread1, LUA_REGISTRYINDEX);
lua_rawgeti(thread1, LUA_REGISTRYINDEX, env);

#if LUABRIDGE_TEST_LUAU || LUABRIDGE_TEST_LUAJIT || LUABRIDGE_TEST_LUA_VERSION == 501
#if LUABRIDGE_ON_LUAU || LUABRIDGE_ON_LUAJIT || LUA_VERSION_NUM == 501
lua_setfenv(thread1, 1);
#else
auto upvalue = lua_setupvalue(thread1, -2, 1);
Expand Down
2 changes: 1 addition & 1 deletion Tests/Source/LuaRefTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ TEST_F(LuaRefTests, Comparison)
EXPECT_TRUE(t2 == t2);
EXPECT_FALSE(t2 == t3);

#if LUABRIDGE_TEST_LUA_VERSION >= 503 && !LUABRIDGE_ON_LUAU && !LUABRIDGE_ON_LUAJIT
#if LUA_VERSION_NUM >= 503 && !LUABRIDGE_ON_LUAU && !LUABRIDGE_ON_LUAJIT
// This has changed in lua 5.3 and is quite a behaviour change
EXPECT_TRUE(t2 == t4);
#else
Expand Down
2 changes: 1 addition & 1 deletion Tests/Source/Tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ TEST_F(LuaBridgeTest, StdSharedPtrDerivedPolymorphic)
#endif
}

#if LUABRIDGE_ON_RAVI
#if LUABRIDGE_ON_RAVI || LUABRIDGE_ON_LUAJIT
return; // TODO - Ravi asserts on the lua state being invalid because of the previous exception
#endif

Expand Down

0 comments on commit c3d96b6

Please sign in to comment.