update tests because AAAAHHHH exceptions

This commit is contained in:
ThePhD 2018-03-22 10:59:37 -04:00
parent 0b4548bed3
commit 8e8dd379ff
2 changed files with 52 additions and 51 deletions

View File

@ -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;
} }

View File

@ -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);