mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-11 04:35:44 -08:00
Fix multi-word type matching in card filters (#6060)
* Fix multi-word type matching in card filters Add phrase matching to StringValue before word-based fallback. Enables searches like t:"time lord" for multi-word creature types. * Use existing typedef * Don't inline lambda * update filter func * Update card type FilterString unit tests * refactor string matcher * update card db test * fix sets count in test * Add regex cache in string matcher * Update cockatrice/src/game/filters/filter_string.cpp * Revert "Add regex cache in string matcher" --------- Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>
This commit is contained in:
@@ -18,8 +18,8 @@ TEST(CardDatabaseTest, LoadXml)
|
||||
|
||||
// load dummy cards and test result
|
||||
db->loadCardDatabases();
|
||||
ASSERT_EQ(8, db->getCardList().size()) << "Wrong card count after load";
|
||||
ASSERT_EQ(4, db->getSetList().size()) << "Wrong sets count after load";
|
||||
ASSERT_EQ(9, db->getCardList().size()) << "Wrong card count after load";
|
||||
ASSERT_EQ(5, 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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user