mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Of course LuaJIT woudl ruin everything.
This commit is contained in:
parent
a0255fac54
commit
934f55058d
|
@ -216,6 +216,7 @@ TEST_CASE("environments/this_environment", "test various situations of pulling o
|
|||
};
|
||||
|
||||
sol::environment e(lua, sol::create, lua.globals());
|
||||
lua["x"] = 5;
|
||||
e["x"] = 20;
|
||||
SECTION("from Lua script") {
|
||||
int value = lua.script(code, e);
|
||||
|
@ -230,6 +231,6 @@ TEST_CASE("environments/this_environment", "test various situations of pulling o
|
|||
SECTION("from C++, with no env") {
|
||||
sol::function f = lua["f"];
|
||||
int value = f(10);
|
||||
REQUIRE(value == 10);
|
||||
REQUIRE(value == 15);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user