From 12d8e40368f957a4af96522090b94466ffd5a2af Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 27 Sep 2019 19:11:45 -0400 Subject: [PATCH] added additional subtype verification skips --- .../java/mage/verify/VerifyCardDataTest.java | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java index 33d8f28e088..e19ba199138 100644 --- a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java +++ b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java @@ -48,6 +48,7 @@ public class VerifyCardDataTest { private static final boolean CHECK_SOURCE_TOKENS = false; private static final HashMap> skipCheckLists = new HashMap<>(); + private static final Set subtypesToIgnore = new HashSet<>(); private static void skipListCreate(String listName) { skipCheckLists.put(listName, new LinkedHashSet<>()); @@ -93,7 +94,9 @@ public class VerifyCardDataTest { // subtype skipListCreate("SUBTYPE"); skipListAddName("SUBTYPE", "UGL", "Miss Demeanor"); - skipListAddName("SUBTYPE", "M10", "Dread Warlock"); + + subtypesToIgnore.add("Noble"); + subtypesToIgnore.add("Warlock"); // number skipListCreate("NUMBER"); @@ -669,8 +672,20 @@ public class VerifyCardDataTest { } } - if (!eqSet(card.getSubtype(null).stream().map(SubType::toString).collect(Collectors.toSet()), expected)) { - fail(card, "subtypes", card.getSubtype(null) + " != " + expected); + // Remove subtypes that need to be ignored + Collection actual = card + .getSubtype(null) + .stream() + .map(SubType::toString) + .collect(Collectors.toSet()); + actual.removeIf(subtypesToIgnore::contains); + + if (expected != null) { + expected.removeIf(subtypesToIgnore::contains); + } + + if (!eqSet(actual, expected)) { + fail(card, "subtypes", actual + " != " + expected); } }