mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Fix typo in tests
This commit is contained in:
parent
4c46df454b
commit
2782fed879
|
@ -231,12 +231,12 @@ TEST_CASE("tables/functions_variables", "Check if tables and function calls work
|
|||
lua.get<sol::table>("os").set_function("fun", &free_function);
|
||||
REQUIRE_NOTHROW(run_script(lua));
|
||||
|
||||
// l-value, can optomize
|
||||
// l-value, can optimise
|
||||
auto lval = object();
|
||||
lua.get<sol::table>("os").set_function("fun", &object::operator(), lval);
|
||||
REQUIRE_NOTHROW(run_script(lua));
|
||||
|
||||
// stateful lambda: non-convertible, unoptomizable
|
||||
// stateful lambda: non-convertible, cannot be optimised
|
||||
int breakit = 50;
|
||||
lua.get<sol::table>("os").set_function("fun",
|
||||
[&breakit] () {
|
||||
|
@ -246,11 +246,11 @@ TEST_CASE("tables/functions_variables", "Check if tables and function calls work
|
|||
);
|
||||
REQUIRE_NOTHROW(run_script(lua));
|
||||
|
||||
// r-value, cannot optomize
|
||||
// r-value, cannot optimise
|
||||
lua.get<sol::table>("os").set_function("fun", &object::operator(), object());
|
||||
REQUIRE_NOTHROW(run_script(lua));
|
||||
|
||||
// r-value, cannot optomize
|
||||
// r-value, cannot optimise
|
||||
auto rval = object();
|
||||
lua.get<sol::table>("os").set_function("fun", &object::operator(), std::move(rval));
|
||||
REQUIRE_NOTHROW(run_script(lua));
|
||||
|
|
Loading…
Reference in New Issue
Block a user