mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
verify test: ref text adjustments to remove some false positives
This commit is contained in:
parent
19dd9ea1b8
commit
9a4f935f07
1 changed files with 17 additions and 16 deletions
|
|
@ -97,7 +97,8 @@ public class VerifyCardDataTest {
|
||||||
private static final List<String> evergreenKeywords = Arrays.asList(
|
private static final List<String> evergreenKeywords = Arrays.asList(
|
||||||
"flying", "lifelink", "menace", "trample", "haste", "first strike", "hexproof", "fear",
|
"flying", "lifelink", "menace", "trample", "haste", "first strike", "hexproof", "fear",
|
||||||
"deathtouch", "double strike", "indestructible", "reach", "flash", "defender", "vigilance",
|
"deathtouch", "double strike", "indestructible", "reach", "flash", "defender", "vigilance",
|
||||||
"plainswalk", "islandwalk", "swampwalk", "mountainwalk", "forestwalk", "myriad", "prowess", "convoke"
|
"plainswalk", "islandwalk", "swampwalk", "mountainwalk", "forestwalk", "myriad", "prowess", "convoke",
|
||||||
|
"shroud", "banding", "flanking", "horsemanship", "legendary landwalk"
|
||||||
);
|
);
|
||||||
|
|
||||||
private static final List<String> doubleWords = new ArrayList<>();
|
private static final List<String> doubleWords = new ArrayList<>();
|
||||||
|
|
@ -269,8 +270,12 @@ public class VerifyCardDataTest {
|
||||||
return skipListGet(listName).contains(set);
|
return skipListGet(listName).contains(set);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For splitting printed rules text with multiple keywords on one line
|
||||||
|
*/
|
||||||
private static boolean evergreenCheck(String s) {
|
private static boolean evergreenCheck(String s) {
|
||||||
return evergreenKeywords.contains(s) || s.startsWith("protection from") || s.startsWith("hexproof from") || s.startsWith("ward ");
|
return evergreenKeywords.contains(s) || s.startsWith("protection from") || s.startsWith("hexproof from")
|
||||||
|
|| s.startsWith("ward ") || s.startsWith("rampage ") || s.startsWith("annihilator");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static <T> boolean eqSet(Collection<T> a, Collection<T> b) {
|
private static <T> boolean eqSet(Collection<T> a, Collection<T> b) {
|
||||||
|
|
@ -2304,11 +2309,11 @@ public class VerifyCardDataTest {
|
||||||
|
|
||||||
private void checkWrongAbilitiesTextEnd() {
|
private void checkWrongAbilitiesTextEnd() {
|
||||||
// TODO: implement tests result/stats by github actions to show in check message compared to prev version
|
// TODO: implement tests result/stats by github actions to show in check message compared to prev version
|
||||||
System.out.println(String.format(""));
|
System.out.println();
|
||||||
System.out.println(String.format("Stats for %d cards checked for abilities text:", wrongAbilityStatsTotal));
|
System.out.printf("Stats for %d cards checked for abilities text:%n", wrongAbilityStatsTotal);
|
||||||
System.out.println(String.format(" - Cards with correct text: %5d (%.2f)", wrongAbilityStatsGood, wrongAbilityStatsGood * 100.0 / wrongAbilityStatsTotal));
|
System.out.printf(" - Cards with correct text: %5d (%.2f)%n", wrongAbilityStatsGood, wrongAbilityStatsGood * 100.0 / wrongAbilityStatsTotal);
|
||||||
System.out.println(String.format(" - Cards with text errors: %5d (%.2f)", wrongAbilityStatsBad, wrongAbilityStatsBad * 100.0 / wrongAbilityStatsTotal));
|
System.out.printf(" - Cards with text errors: %5d (%.2f)%n", wrongAbilityStatsBad, wrongAbilityStatsBad * 100.0 / wrongAbilityStatsTotal);
|
||||||
System.out.println(String.format(""));
|
System.out.println();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkWrongAbilitiesText(Card card, MtgJsonCard ref, int cardIndex) {
|
private void checkWrongAbilitiesText(Card card, MtgJsonCard ref, int cardIndex) {
|
||||||
|
|
@ -2380,15 +2385,11 @@ public class VerifyCardDataTest {
|
||||||
|
|
||||||
if (ref.subtypes.contains("Adventure")) {
|
if (ref.subtypes.contains("Adventure")) {
|
||||||
for (int i = 0; i < refRules.length; i++) {
|
for (int i = 0; i < refRules.length; i++) {
|
||||||
refRules[i] = new StringBuilder("Adventure ")
|
refRules[i] = "Adventure " +
|
||||||
.append(ref.types.get(0))
|
ref.types.get(0) + " - " +
|
||||||
.append(" - ")
|
ref.faceName + ' ' +
|
||||||
.append(ref.faceName)
|
ref.manaCost + " - " +
|
||||||
.append(' ')
|
refRules[i];
|
||||||
.append(ref.manaCost)
|
|
||||||
.append(" - ")
|
|
||||||
.append(refRules[i])
|
|
||||||
.toString();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue