diff options
-rw-r--r-- | netfs/unittests/testLib.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/netfs/unittests/testLib.cpp b/netfs/unittests/testLib.cpp index 14ea71f..ba3ef44 100644 --- a/netfs/unittests/testLib.cpp +++ b/netfs/unittests/testLib.cpp @@ -50,3 +50,18 @@ BOOST_DATA_TEST_CASE(foundname, GoodNames ^ GoodIds, name, id) } BOOST_AUTO_TEST_SUITE_END(); + +BOOST_AUTO_TEST_CASE(group_membership) +{ + Group g(0, "root"); + g.members.insert(0); + g.members.insert(1); + g.members.insert(5); + + BOOST_REQUIRE_EQUAL(3, g.members.size()); + BOOST_CHECK(g.hasMember(0)); + BOOST_CHECK(g.hasMember(1)); + BOOST_CHECK(g.hasMember(5)); + BOOST_CHECK(!g.hasMember(3)); + BOOST_CHECK(!g.hasMember(6)); +} |