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;
|
sol::state lua;
|
||||||
lua.open_libraries();
|
lua.open_libraries(sol::lib::base);
|
||||||
lua.new_usertype<B>("B",
|
lua.new_usertype<B>("B",
|
||||||
// bind as variable
|
// bind as variable
|
||||||
"b", &B::bvar,
|
"b", &B::bvar,
|
||||||
@ -18,10 +18,11 @@ int main () {
|
|||||||
|
|
||||||
B b;
|
B b;
|
||||||
lua.set("b", &b);
|
lua.set("b", &b);
|
||||||
lua.script("x = b:f()");
|
lua.script(R"(x = b:f()
|
||||||
lua.script("y = b.b");
|
y = b.b
|
||||||
int x = lua["x"];
|
assert(x == 24)
|
||||||
int y = lua["y"];
|
assert(y == 24)
|
||||||
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") {
|
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;
|
sol::state lua;
|
||||||
lua.open_libraries(sol::lib::base, sol::lib::debug);
|
lua.open_libraries(sol::lib::base, sol::lib::debug);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user