mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-31 15:07:29 -08:00
update handling of keywords: AND, OR, NOT in card search (#5788)
* update hnadling of keywords: AND, OR, NOT in card search * added and * update test * update test * update OR to not be [oO][rR] and just look for OR * keyword testing * adjusted new test * implement test case for cards with keyword in name * implement test case to cards with keyword in name * format * update test case * change test cas * update truth test case * changed test card search from real cards to fake and added cards * Update tests/carddatabase/data/cards.xml Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com> * Update tests/carddatabase/filter_string_test.cpp Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com> * Update tests/carddatabase/filter_string_test.cpp Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com> * update formatting * update cardatabase_test to include +2 cards * update test case +1 set + 1 type --------- Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>
This commit is contained in:
@@ -18,9 +18,9 @@ TEST(CardDatabaseTest, LoadXml)
|
||||
|
||||
// load dummy cards and test result
|
||||
db->loadCardDatabases();
|
||||
ASSERT_EQ(6, db->getCardList().size()) << "Wrong card count after load";
|
||||
ASSERT_EQ(3, db->getSetList().size()) << "Wrong sets count after load";
|
||||
ASSERT_EQ(2, db->getAllMainCardTypes().size()) << "Wrong types count after load";
|
||||
ASSERT_EQ(8, db->getCardList().size()) << "Wrong card count after load";
|
||||
ASSERT_EQ(4, db->getSetList().size()) << "Wrong sets count after load";
|
||||
ASSERT_EQ(3, db->getAllMainCardTypes().size()) << "Wrong types count after load";
|
||||
ASSERT_EQ(Ok, db->getLoadStatus()) << "Wrong status after load";
|
||||
|
||||
// ensure the card database is empty after clear()
|
||||
|
||||
Reference in New Issue
Block a user