32 "random_traits",
false,
43 orc1->set_name(
"Larry");
44 orc2->set_name(
"Moe");
46 orc1->set_id(
"larry");
50 BOOST_CHECK_EQUAL(recall_man.
size(), 0);
51 BOOST_CHECK_MESSAGE(recall_man.
begin() == recall_man.
end(),
"failed begin() == end() for an empty container");
54 BOOST_CHECK_EQUAL(recall_man.
size(), 1);
55 BOOST_CHECK_MESSAGE(recall_man[0] == orc1,
"unexpected result at index [0]");
56 BOOST_CHECK_MESSAGE(recall_man.
find_if_matches_id(
"larry") == orc1,
"found something unexpected");
57 BOOST_CHECK_MESSAGE(!recall_man.
find_if_matches_id(
"moe"),
"found something unexpected");
60 BOOST_CHECK_EQUAL(recall_man.
size(), 2);
61 BOOST_CHECK_MESSAGE(recall_man[0] == orc1,
"unexpected result at index [0]");
62 BOOST_CHECK_MESSAGE(recall_man[1] == orc2,
"unexpected result at index [1]");
63 BOOST_CHECK_MESSAGE(recall_man.
find_if_matches_id(
"larry") == orc1,
"found something unexpected");
64 BOOST_CHECK_MESSAGE(recall_man.
find_if_matches_id(
"moe") == orc2,
"found something unexpected");
67 BOOST_CHECK_EQUAL(recall_man.
size(), 1);
68 BOOST_CHECK_MESSAGE(recall_man[0] == orc2,
"unexpected result at index [0]");
69 BOOST_CHECK_MESSAGE(!recall_man.
find_if_matches_id(
"larry"),
"found something unexpected");
70 BOOST_CHECK_MESSAGE(recall_man.
find_if_matches_id(
"moe") == orc2,
"found something unexpected");
73 BOOST_CHECK_EQUAL(recall_man.
size(), 2);
74 BOOST_CHECK_MESSAGE(recall_man[0] == orc2,
"unexpected result at index [0]");
75 BOOST_CHECK_MESSAGE(recall_man[1] == orc1,
"unexpected result at index [1]");
76 BOOST_CHECK_MESSAGE(recall_man.
find_if_matches_id(
"larry") == orc1,
"found something unexpected");
77 BOOST_CHECK_MESSAGE(recall_man.
find_if_matches_id(
"moe") == orc2,
"found something unexpected");
static unit_ptr create(const config &cfg, bool use_traits=false, const vconfig *vcfg=nullptr)
Initializes a unit from a config.