PRAISE BASED EEVEE

This commit is contained in:
ThePhD 2016-11-26 03:32:28 -05:00
parent 289ded358c
commit 7b63057ba8
3 changed files with 50 additions and 4 deletions

View File

@ -20,8 +20,8 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// This file was generated with a script.
// Generated 2016-11-26 01:46:59.897910 UTC
// This header was generated with sol v2.15.2 (revision 49a0f71)
// Generated 2016-11-26 08:32:10.873025 UTC
// This header was generated with sol v2.15.2 (revision 289ded3)
// https://github.com/ThePhD/sol2
#ifndef SOL_SINGLE_INCLUDE_HPP
@ -6936,7 +6936,7 @@ namespace sol {
}
int last = index + count;
for (int i = index; i < last; ++i) {
lua_remove(L, i);
lua_remove(L, index);
}
}

View File

@ -123,7 +123,7 @@ namespace sol {
}
int last = index + count;
for (int i = index; i < last; ++i) {
lua_remove(L, i);
lua_remove(L, index);
}
}

View File

@ -986,3 +986,49 @@ TEST_CASE("functions/same-type-closures", "make sure destructions are per-object
REQUIRE_FALSE(check_failed);
REQUIRE(last_my_closures.size() == 2);
}
TEST_CASE("functions/stack-multi-return", "Make sure the stack is protected after multi-returns") {
sol::state lua;
lua.script("function f () return 1, 2, 3, 4, 5 end");
{
sol::stack_guard sg(lua);
sol::stack::push(lua, double(256.78));
{
int a, b, c, d, e;
sol::stack_guard sg2(lua);
sol::function f = lua["f"];
sol::tie(a, b, c, d, e) = f();
REQUIRE(a == 1);
REQUIRE(b == 2);
REQUIRE(c == 3);
REQUIRE(d == 4);
REQUIRE(e == 5);
}
double f = sol::stack::pop<double>(lua);
REQUIRE(f == 256.78);
}
}
TEST_CASE("functions/protected-stack-multi-return", "Make sure the stack is protected after multi-returns") {
sol::state lua;
lua.script("function f () return 1, 2, 3, 4, 5 end");
{
sol::stack_guard sg(lua);
sol::stack::push(lua, double(256.78));
{
int a, b, c, d, e;
sol::stack_guard sg2(lua);
sol::protected_function pf = lua["f"];
sol::tie(a, b, c, d, e) = pf();
REQUIRE(a == 1);
REQUIRE(b == 2);
REQUIRE(c == 3);
REQUIRE(d == 4);
REQUIRE(e == 5);
}
double f = sol::stack::pop<double>(lua);
REQUIRE(f == 256.78);
}
}