add test for map

This commit is contained in:
Carlos Carrasco 2017-05-03 22:37:23 +02:00 committed by The Phantom Derpstorm
parent e13711ed84
commit 7b78558413

View File

@ -322,11 +322,19 @@ end
REQUIRE(map.size() == 6); REQUIRE(map.size() == 6);
REQUIRE(set.size() == 6); REQUIRE(set.size() == 6);
{
int r = sf(set, 8); int r = sf(set, 8);
REQUIRE(r == 8); REQUIRE(r == 8);
sol::object rn = sf(set, 9); sol::object rn = sf(set, 9);
REQUIRE(rn == sol::nil); REQUIRE(rn == sol::nil);
}
{
int r = sf(map, 3);
REQUIRE(r == 6);
sol::object rn = sf(map, 9);
REQUIRE(rn == sol::nil);
}
i(lua["arr"]); i(lua["arr"]);
i(lua["map"]); i(lua["map"]);