From ceedf8077728da8d462bbdf607a89da82e9a5f2b Mon Sep 17 00:00:00 2001 From: rnveach Date: Thu, 5 Nov 2015 22:40:26 -0500 Subject: [PATCH] Issue #2161: unify test input file names --- .../checks/coding/MagicNumberCheckTest.java | 24 +++++++++---------- ...ion.java => InputIntMethodAnnotation.java} | 2 +- .../checks/coding/InputMagicNumber.java | 8 +++---- 3 files changed, 17 insertions(+), 17 deletions(-) rename src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/{IntMethodAnnotation.java => InputIntMethodAnnotation.java} (86%) diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheckTest.java index 2b713cb88..39a77668b 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/MagicNumberCheckTest.java @@ -80,10 +80,10 @@ public class MagicNumberCheckTest "174:15: " + getCheckMessage(MSG_KEY, "21"), "178:15: " + getCheckMessage(MSG_KEY, "37"), "182:15: " + getCheckMessage(MSG_KEY, "101"), - "185:26: " + getCheckMessage(MSG_KEY, "42"), - "189:32: " + getCheckMessage(MSG_KEY, "43"), - "193:26: " + getCheckMessage(MSG_KEY, "-44"), - "197:32: " + getCheckMessage(MSG_KEY, "-45"), + "185:31: " + getCheckMessage(MSG_KEY, "42"), + "189:37: " + getCheckMessage(MSG_KEY, "43"), + "193:31: " + getCheckMessage(MSG_KEY, "-44"), + "197:37: " + getCheckMessage(MSG_KEY, "-45"), }; verify(checkConfig, getPath("InputMagicNumber.java"), expected); } @@ -375,10 +375,10 @@ public class MagicNumberCheckTest "174:15: " + getCheckMessage(MSG_KEY, "21"), "178:15: " + getCheckMessage(MSG_KEY, "37"), "182:15: " + getCheckMessage(MSG_KEY, "101"), - "185:26: " + getCheckMessage(MSG_KEY, "42"), - "189:32: " + getCheckMessage(MSG_KEY, "43"), - "193:26: " + getCheckMessage(MSG_KEY, "-44"), - "197:32: " + getCheckMessage(MSG_KEY, "-45"), + "185:31: " + getCheckMessage(MSG_KEY, "42"), + "189:37: " + getCheckMessage(MSG_KEY, "43"), + "193:31: " + getCheckMessage(MSG_KEY, "-44"), + "197:37: " + getCheckMessage(MSG_KEY, "-45"), }; verify(checkConfig, getPath("InputMagicNumber.java"), expected); } @@ -433,10 +433,10 @@ public class MagicNumberCheckTest "174:15: " + getCheckMessage(MSG_KEY, "21"), "178:15: " + getCheckMessage(MSG_KEY, "37"), "182:15: " + getCheckMessage(MSG_KEY, "101"), - "185:26: " + getCheckMessage(MSG_KEY, "42"), - "189:32: " + getCheckMessage(MSG_KEY, "43"), - "193:26: " + getCheckMessage(MSG_KEY, "-44"), - "197:32: " + getCheckMessage(MSG_KEY, "-45"), + "185:31: " + getCheckMessage(MSG_KEY, "42"), + "189:37: " + getCheckMessage(MSG_KEY, "43"), + "193:31: " + getCheckMessage(MSG_KEY, "-44"), + "197:37: " + getCheckMessage(MSG_KEY, "-45"), "209:63: " + getCheckMessage(MSG_KEY, "62"), }; verify(checkConfig, getPath("InputMagicNumber.java"), expected); diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/IntMethodAnnotation.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/InputIntMethodAnnotation.java similarity index 86% rename from src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/IntMethodAnnotation.java rename to src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/InputIntMethodAnnotation.java index 365763d4b..51f2231f5 100644 --- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/IntMethodAnnotation.java +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/InputIntMethodAnnotation.java @@ -7,6 +7,6 @@ import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) -public @interface IntMethodAnnotation{ +public @interface InputIntMethodAnnotation{ int value(); } \ No newline at end of file diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/InputMagicNumber.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/InputMagicNumber.java index 01e7c1ecd..214fad78f 100644 --- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/InputMagicNumber.java +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/InputMagicNumber.java @@ -182,19 +182,19 @@ class TestHashCodeMethod { int z=101; } - @IntMethodAnnotation(42) + @InputIntMethodAnnotation(42) public void another() { } - @IntMethodAnnotation(value=43) + @InputIntMethodAnnotation(value=43) public void another2() { } - @IntMethodAnnotation(-44) + @InputIntMethodAnnotation(-44) public void anotherNegative() { } - @IntMethodAnnotation(value=-45) + @InputIntMethodAnnotation(value=-45) public void anotherNegative2() { } }