mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
update tests because AAAAHHHH exceptions
This commit is contained in:
parent
0b4548bed3
commit
8e8dd379ff
|
@ -8,7 +8,7 @@ int main () {
|
|||
};
|
||||
|
||||
sol::state lua;
|
||||
lua.open_libraries();
|
||||
lua.open_libraries(sol::lib::base);
|
||||
lua.new_usertype<B>("B",
|
||||
// bind as variable
|
||||
"b", &B::bvar,
|
||||
|
@ -18,10 +18,11 @@ int main () {
|
|||
|
||||
B b;
|
||||
lua.set("b", &b);
|
||||
lua.script("x = b:f()");
|
||||
lua.script("y = b.b");
|
||||
int x = lua["x"];
|
||||
int y = lua["y"];
|
||||
assert(x == 24);
|
||||
assert(y == 24);
|
||||
lua.script(R"(x = b:f()
|
||||
y = b.b
|
||||
assert(x == 24)
|
||||
assert(y == 24)
|
||||
)");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -335,7 +335,7 @@ TEST_CASE("functions/returning functions from C++", "check to see if returning a
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(SOL_LUAJIT) || (defined(_WIN32) && (defined(_WIN64)))
|
||||
#if !defined(SOL2_CI)
|
||||
TEST_CASE("functions/function_result and protected_function_result", "Function result should be the beefy return type for sol::function that allows for error checking and error handlers") {
|
||||
sol::state lua;
|
||||
lua.open_libraries(sol::lib::base, sol::lib::debug);
|
||||
|
|
Loading…
Reference in New Issue
Block a user