From eae9a21154ef7b3782a93756f07740d81cccb16f Mon Sep 17 00:00:00 2001 From: RickyRister Date: Fri, 1 Aug 2025 13:05:22 -0700 Subject: [PATCH] Update card type FilterString unit tests --- tests/carddatabase/data/cards.xml | 19 +++++++++++++++++-- tests/carddatabase/filter_string_test.cpp | 5 +++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/tests/carddatabase/data/cards.xml b/tests/carddatabase/data/cards.xml index f235ab4f9..2c1c09ed8 100644 --- a/tests/carddatabase/data/cards.xml +++ b/tests/carddatabase/data/cards.xml @@ -11,7 +11,7 @@ G 2G 2 - Creature + Creature — Cat Creature 3/3 @@ -26,7 +26,22 @@ R 2RR 4 - Creature + Creature — Dog + Creature + 4/4 + + + + Doctor + WHO + 0 + Why did wizards introduce two-word creature types + + 222 + R + 2RR + 4 + Creature — Human Time Lord Doctor Creature 4/4 diff --git a/tests/carddatabase/filter_string_test.cpp b/tests/carddatabase/filter_string_test.cpp index b29660159..534600e84 100644 --- a/tests/carddatabase/filter_string_test.cpp +++ b/tests/carddatabase/filter_string_test.cpp @@ -21,12 +21,14 @@ protected: cat = CardDatabaseManager::getInstance()->getCardBySimpleName("Cat"); notDeadAfterAll = CardDatabaseManager::getInstance()->getCardBySimpleName("Not Dead"); truth = CardDatabaseManager::getInstance()->getCardBySimpleName("Truth"); + doctor = CardDatabaseManager::getInstance()->getCardBySimpleName("Doctor"); } // void TearDown() override {} CardData cat; CardData notDeadAfterAll; CardData truth; + CardData doctor; }; QUERY(Empty, cat, "", true) @@ -34,6 +36,9 @@ QUERY(Typing, cat, "t", true) QUERY(NonMatchingType, cat, "t:kithkin", false) QUERY(MatchingType, cat, "t:creature", true) +QUERY(MatchingCreatureType, cat, "t:cat", true) +QUERY(PartialMatchingType, cat, "t:ca", false) +QUERY(MatchingMultiWordType, doctor, "t:\"Time Lord\"", true) QUERY(Not1, cat, "NOT t:kithkin", true) QUERY(Not2, cat, "NOT t:creature", false) QUERY(NonKeyword1, cat, "not t:kithkin", false)