New test case to cover
This commit is contained in:
parent
27b3812725
commit
9d81562917
1 changed files with 13 additions and 0 deletions
|
|
@ -165,6 +165,19 @@ TEST_CASE("[D] Double erase no throw", "[pushpop][1]") {
|
||||||
REQUIRE_FALSE(gestionnaire.erase_object(sheet, weapons::Bow));
|
REQUIRE_FALSE(gestionnaire.erase_object(sheet, weapons::Bow));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE("[D] Insert no more than 3", "[pushpop][2]") {
|
||||||
|
BillyObjects gestionnaire{};
|
||||||
|
CharacterSheet sheet;
|
||||||
|
REQUIRE(sheet.get_objects().empty());
|
||||||
|
|
||||||
|
REQUIRE_NOTHROW(gestionnaire.insert_object(sheet, weapons::Sword));
|
||||||
|
REQUIRE(gestionnaire.insert_object(sheet, weapons::Morgenstern));
|
||||||
|
REQUIRE(gestionnaire.insert_object(sheet, weapons::Bow));
|
||||||
|
REQUIRE(sheet.get_objects().size() == 3);
|
||||||
|
REQUIRE_FALSE(gestionnaire.insert_object(sheet, equipments::Chainmail));
|
||||||
|
REQUIRE(sheet.get_objects().size() == 3);
|
||||||
|
}
|
||||||
|
|
||||||
TEST_CASE("[D] Printing Billy's objects", "[printing]") {
|
TEST_CASE("[D] Printing Billy's objects", "[printing]") {
|
||||||
for (const auto &object: BillyObjects::all_objects) {
|
for (const auto &object: BillyObjects::all_objects) {
|
||||||
const std::unique_ptr<GenericObject> obj = test::get_obj(object);
|
const std::unique_ptr<GenericObject> obj = test::get_obj(object);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue