From b0a2abb20589f7884817e3acd17e531320adb286 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 12 Oct 2021 09:35:53 -0400 Subject: [PATCH] fixed verify test not checking split/aftermath cards correctly --- .../main/java/mage/verify/mtgjson/MtgJsonCard.java | 2 ++ .../test/java/mage/verify/VerifyCardDataTest.java | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Mage.Verify/src/main/java/mage/verify/mtgjson/MtgJsonCard.java b/Mage.Verify/src/main/java/mage/verify/mtgjson/MtgJsonCard.java index 2b448af36c..bc5da1dee5 100644 --- a/Mage.Verify/src/main/java/mage/verify/mtgjson/MtgJsonCard.java +++ b/Mage.Verify/src/main/java/mage/verify/mtgjson/MtgJsonCard.java @@ -40,6 +40,8 @@ public final class MtgJsonCard { || "flip".equals(layout) || "adventure".equals(layout) || "modal_dfc".equals(layout) + || "split".equals(layout) + || "aftermath".equals(layout) || "meld".equals(layout)) { // mtgjson uses composite names for meld cards, but scryfall uses simple face names return faceName; } diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java index c91d9f4ccc..97c2b8860a 100644 --- a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java +++ b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java @@ -262,13 +262,13 @@ public class VerifyCardDataTest { for (Card card : CardScanner.getAllCards()) { cardIndex++; if (card instanceof SplitCard) { - check(((SplitCard) card).getLeftHalfCard(), cardIndex, true); - check(((SplitCard) card).getRightHalfCard(), cardIndex, true); + check(((SplitCard) card).getLeftHalfCard(), cardIndex); + check(((SplitCard) card).getRightHalfCard(), cardIndex); } else if (card instanceof ModalDoubleFacesCard) { - check(((ModalDoubleFacesCard) card).getLeftHalfCard(), cardIndex, false); - check(((ModalDoubleFacesCard) card).getRightHalfCard(), cardIndex, false); + check(((ModalDoubleFacesCard) card).getLeftHalfCard(), cardIndex); + check(((ModalDoubleFacesCard) card).getRightHalfCard(), cardIndex); } else { - check(card, cardIndex, false); + check(card, cardIndex); } } @@ -1231,11 +1231,11 @@ public class VerifyCardDataTest { } } - private void check(Card card, int cardIndex, boolean skipWarning) { + private void check(Card card, int cardIndex) { MtgJsonCard ref = MtgJsonService.cardFromSet(card.getExpansionSetCode(), card.getName(), card.getCardNumber()); if (ref != null) { checkAll(card, ref, cardIndex); - } else if (!skipWarning && !ONLY_TEXT) { + } else { warn(card, "Missing card reference"); } }