mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
add test for map
This commit is contained in:
parent
e13711ed84
commit
7b78558413
|
@ -322,11 +322,19 @@ end
|
|||
REQUIRE(map.size() == 6);
|
||||
REQUIRE(set.size() == 6);
|
||||
|
||||
int r = sf(set, 8);
|
||||
REQUIRE(r == 8);
|
||||
{
|
||||
int r = sf(set, 8);
|
||||
REQUIRE(r == 8);
|
||||
sol::object rn = sf(set, 9);
|
||||
REQUIRE(rn == sol::nil);
|
||||
}
|
||||
|
||||
sol::object rn = sf(set, 9);
|
||||
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["map"]);
|
||||
|
|
Loading…
Reference in New Issue
Block a user