diff options
author | rnveach <rveach02@gmail.com> | 2015-10-15 22:53:56 -0400 |
---|---|---|
committer | rnveach <rveach02@gmail.com> | 2015-10-16 18:13:31 -0400 |
commit | bf529ef600fa9ef2034d0412c198b2121f2b94f2 (patch) | |
tree | 67c91bbe5623976acc64b8ae64351130171c37f7 /src/test/java | |
parent | 61f8aaca7bcb8750909bcc95eb5c27c72c7d824d (diff) | |
download | checkstyle-bf529ef600fa9ef2034d0412c198b2121f2b94f2.tar.gz |
Issue #2161: unify test input locations for blocks package
Diffstat (limited to 'src/test/java')
5 files changed, 131 insertions, 94 deletions
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/EmptyBlockCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/EmptyBlockCheckTest.java index f1931f40f..06c2bdbea 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/EmptyBlockCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/EmptyBlockCheckTest.java @@ -23,6 +23,9 @@ import static com.puppycrawl.tools.checkstyle.checks.blocks.EmptyBlockCheck.MSG_ import static com.puppycrawl.tools.checkstyle.checks.blocks.EmptyBlockCheck.MSG_KEY_BLOCK_NO_STMT; import static org.junit.Assert.assertEquals; +import java.io.File; +import java.io.IOException; + import org.junit.Test; import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport; @@ -30,6 +33,11 @@ import com.puppycrawl.tools.checkstyle.DefaultConfiguration; public class EmptyBlockCheckTest extends BaseCheckTestSupport { + @Override + protected String getPath(String filename) throws IOException { + return super.getPath("checks" + File.separator + + "blocks" + File.separator + filename); + } /* Additional test for jacoco, since valueOf() * is generated by javac and jacoco reports that @@ -47,14 +55,14 @@ public class EmptyBlockCheckTest final DefaultConfiguration checkConfig = createCheckConfig(EmptyBlockCheck.class); final String[] expected = { - "75:13: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), - "77:17: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), - "79:13: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), - "82:17: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), - "178:5: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), - "206:29: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), - "208:41: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), - "219:12: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), + "33:13: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), + "35:17: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), + "37:13: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), + "40:17: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), + "63:5: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), + "71:29: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), + "73:41: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), + "84:12: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), }; verify(checkConfig, getPath("InputSemantic.java"), expected); } @@ -66,11 +74,11 @@ public class EmptyBlockCheckTest createCheckConfig(EmptyBlockCheck.class); checkConfig.addAttribute("option", BlockOption.TEXT.toString()); final String[] expected = { - "75:13: " + getCheckMessage(MSG_KEY_BLOCK_EMPTY, "try"), - "77:17: " + getCheckMessage(MSG_KEY_BLOCK_EMPTY, "finally"), - "178:5: " + getCheckMessage(MSG_KEY_BLOCK_EMPTY, "INSTANCE_INIT"), - "206:29: " + getCheckMessage(MSG_KEY_BLOCK_EMPTY, "synchronized"), - "219:12: " + getCheckMessage(MSG_KEY_BLOCK_EMPTY, "STATIC_INIT"), + "33:13: " + getCheckMessage(MSG_KEY_BLOCK_EMPTY, "try"), + "35:17: " + getCheckMessage(MSG_KEY_BLOCK_EMPTY, "finally"), + "63:5: " + getCheckMessage(MSG_KEY_BLOCK_EMPTY, "INSTANCE_INIT"), + "71:29: " + getCheckMessage(MSG_KEY_BLOCK_EMPTY, "synchronized"), + "84:12: " + getCheckMessage(MSG_KEY_BLOCK_EMPTY, "STATIC_INIT"), }; verify(checkConfig, getPath("InputSemantic.java"), expected); } @@ -82,14 +90,14 @@ public class EmptyBlockCheckTest createCheckConfig(EmptyBlockCheck.class); checkConfig.addAttribute("option", BlockOption.STMT.toString()); final String[] expected = { - "75:13: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), - "77:17: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), - "79:13: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), - "82:17: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), - "178:5: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), - "206:29: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), - "208:41: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), - "219:12: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), + "33:13: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), + "35:17: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), + "37:13: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), + "40:17: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), + "63:5: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), + "71:29: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), + "73:41: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), + "84:12: " + getCheckMessage(MSG_KEY_BLOCK_NO_STMT), }; verify(checkConfig, getPath("InputSemantic.java"), expected); } diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheckTest.java index c044a3055..653811013 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/LeftCurlyCheckTest.java @@ -25,6 +25,9 @@ import static com.puppycrawl.tools.checkstyle.checks.blocks.LeftCurlyCheck.MSG_K import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; +import java.io.File; +import java.io.IOException; + import org.apache.commons.lang3.ArrayUtils; import org.junit.Before; import org.junit.Test; @@ -41,6 +44,12 @@ public class LeftCurlyCheckTest extends BaseCheckTestSupport { checkConfig = createCheckConfig(LeftCurlyCheck.class); } + @Override + protected String getPath(String filename) throws IOException { + return super.getPath("checks" + File.separator + + "blocks" + File.separator + filename); + } + /* Additional test for jacoco, since valueOf() * is generated by javac and jacoco reports that * valueOf() is uncovered. @@ -62,10 +71,10 @@ public class LeftCurlyCheckTest extends BaseCheckTestSupport { public void testDefault() throws Exception { final String[] expected = { "8:1: " + getCheckMessage(MSG_KEY_LINE_PREVIOUS, "{", 1), - "12:5: " + getCheckMessage(MSG_KEY_LINE_PREVIOUS, "{", 5), - "21:5: " + getCheckMessage(MSG_KEY_LINE_PREVIOUS, "{", 5), - "30:5: " + getCheckMessage(MSG_KEY_LINE_PREVIOUS, "{", 5), - "39:5: " + getCheckMessage(MSG_KEY_LINE_PREVIOUS, "{", 5), + "10:5: " + getCheckMessage(MSG_KEY_LINE_PREVIOUS, "{", 5), + "14:5: " + getCheckMessage(MSG_KEY_LINE_PREVIOUS, "{", 5), + "18:5: " + getCheckMessage(MSG_KEY_LINE_PREVIOUS, "{", 5), + "22:5: " + getCheckMessage(MSG_KEY_LINE_PREVIOUS, "{", 5), }; verify(checkConfig, getPath("InputScopeInnerInterfaces.java"), expected); } @@ -74,12 +83,12 @@ public class LeftCurlyCheckTest extends BaseCheckTestSupport { public void testNL() throws Exception { checkConfig.addAttribute("option", LeftCurlyOption.NL.toString()); final String[] expected = { - "49:14: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 14), - "53:14: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 14), - "58:18: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 18), - "62:18: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 18), - "67:12: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 12), - "72:18: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 18), + "27:14: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 14), + "31:14: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 14), + "36:18: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 18), + "40:18: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 18), + "45:12: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 12), + "50:18: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 18), }; verify(checkConfig, getPath("InputScopeInnerInterfaces.java"), expected); } @@ -89,16 +98,16 @@ public class LeftCurlyCheckTest extends BaseCheckTestSupport { checkConfig.addAttribute("option", LeftCurlyOption.NLOW.toString()); final String[] expected = { "8:1: " + getCheckMessage(MSG_KEY_LINE_PREVIOUS, "{", 1), - "12:5: " + getCheckMessage(MSG_KEY_LINE_PREVIOUS, "{", 5), - "21:5: " + getCheckMessage(MSG_KEY_LINE_PREVIOUS, "{", 5), - "30:5: " + getCheckMessage(MSG_KEY_LINE_PREVIOUS, "{", 5), - "39:5: " + getCheckMessage(MSG_KEY_LINE_PREVIOUS, "{", 5), - "49:14: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 14), - "53:14: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 14), - "58:18: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 18), - "62:18: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 18), - "67:12: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 12), - "72:18: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 18), + "10:5: " + getCheckMessage(MSG_KEY_LINE_PREVIOUS, "{", 5), + "14:5: " + getCheckMessage(MSG_KEY_LINE_PREVIOUS, "{", 5), + "18:5: " + getCheckMessage(MSG_KEY_LINE_PREVIOUS, "{", 5), + "22:5: " + getCheckMessage(MSG_KEY_LINE_PREVIOUS, "{", 5), + "27:14: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 14), + "31:14: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 14), + "36:18: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 18), + "40:18: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 18), + "45:12: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 12), + "50:18: " + getCheckMessage(MSG_KEY_LINE_NEW, "{", 18), }; verify(checkConfig, getPath("InputScopeInnerInterfaces.java"), expected); } diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/NeedBracesCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/NeedBracesCheckTest.java index e3b14433f..8133bf1ec 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/NeedBracesCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/NeedBracesCheckTest.java @@ -22,6 +22,7 @@ package com.puppycrawl.tools.checkstyle.checks.blocks; import static com.puppycrawl.tools.checkstyle.checks.blocks.NeedBracesCheck.MSG_KEY_NEED_BRACES; import java.io.File; +import java.io.IOException; import org.apache.commons.lang3.ArrayUtils; import org.junit.Test; @@ -30,6 +31,18 @@ import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport; import com.puppycrawl.tools.checkstyle.DefaultConfiguration; public class NeedBracesCheckTest extends BaseCheckTestSupport { + @Override + protected String getPath(String filename) throws IOException { + return super.getPath("checks" + File.separator + + "blocks" + File.separator + filename); + } + + @Override + protected String getNonCompilablePath(String filename) throws IOException { + return super.getNonCompilablePath("checks" + File.separator + + "blocks" + File.separator + filename); + } + @Test public void testIt() throws Exception { final DefaultConfiguration checkConfig = @@ -85,9 +98,7 @@ public class NeedBracesCheckTest extends BaseCheckTestSupport { final String[] expected = { "7: " + getCheckMessage(MSG_KEY_NEED_BRACES, "->"), }; - verify(checkConfig, new File("src/test/resources-noncompilable/com/puppycrawl/" - + "tools/checkstyle/blocks/InputSingleLineLambda.java").getCanonicalPath(), - expected); + verify(checkConfig, getNonCompilablePath("InputSingleLineLambda.java"), expected); } @Test diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheckTest.java index 2f8ab4de6..047cfa2a4 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/blocks/RightCurlyCheckTest.java @@ -25,6 +25,9 @@ import static com.puppycrawl.tools.checkstyle.checks.blocks.RightCurlyCheck.MSG_ import static com.puppycrawl.tools.checkstyle.checks.blocks.RightCurlyCheck.MSG_KEY_LINE_SAME; import static org.junit.Assert.assertEquals; +import java.io.File; +import java.io.IOException; + import org.apache.commons.lang3.ArrayUtils; import org.junit.Before; import org.junit.Test; @@ -40,6 +43,12 @@ public class RightCurlyCheckTest extends BaseCheckTestSupport { checkConfig = createCheckConfig(RightCurlyCheck.class); } + @Override + protected String getPath(String filename) throws IOException { + return super.getPath("checks" + File.separator + + "blocks" + File.separator + filename); + } + /* Additional test for jacoco, since valueOf() * is generated by javac and jacoco reports that * valueOf() is uncovered. @@ -160,57 +169,57 @@ public class RightCurlyCheckTest extends BaseCheckTestSupport { + "LITERAL_ELSE, CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, " + "STATIC_INIT, INSTANCE_INIT"); final String[] expected = { - "9:77: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 77), - "12:65: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 65), - "23:46: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 46), - "27:31: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 31), - "30:35: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 35), - "33:36: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 36), - "39:73: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 73), - "41:37: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 37), - "46:58: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 58), - "48:97: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 97), - "51:30: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 30), - "54:30: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 30), - "61:38: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 38), - "68:62: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 62), - "77:28: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 28), - "79:21: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 21), - "81:20: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 20), - "83:14: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 14), - "94:26: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 26), - "104:29: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 29), - "108:29: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 29), - "112:52: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 52), - "112:112: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 112), - "115:18: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 18), - "119:23: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 23), - "122:37: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 37), - "124:30: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 30), - "128:77: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 77), - "137:9: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 9), - "139:9: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 9), - "149:9: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 9), - "151:75: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 75), + "8:77: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 77), + "11:65: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 65), + "22:46: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 46), + "26:31: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 31), + "29:35: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 35), + "32:36: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 36), + "38:73: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 73), + "40:37: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 37), + "45:58: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 58), + "47:97: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 97), + "50:30: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 30), + "53:30: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 30), + "60:38: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 38), + "67:62: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 62), + "76:28: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 28), + "78:21: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 21), + "80:20: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 20), + "82:14: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 14), + "93:26: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 26), + "103:29: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 29), + "107:29: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 29), + "111:52: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 52), + "111:112: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 112), + "114:18: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 18), + "118:23: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 23), + "121:37: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 37), + "123:30: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 30), + "127:77: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 77), + "136:9: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 9), + "138:9: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 9), + "148:9: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 9), + "150:75: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 75), + "151:77: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 77), + "151:93: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 93), "152:77: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 77), - "152:93: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 93), "153:77: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 77), - "154:77: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 77), - "154:93: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 93), - "160:37: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 37), - "167:37: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 37), - "182:9: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 9), - "189:9: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 9), - "189:13: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 13), - "198:9: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 9), - "198:10: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 10), - "202:49: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 49), - "202:50: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 50), - "205:75: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 75), - "205:76: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 76), - "205:77: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 77), - "209:76: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 76), - "217:27: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 27), + "153:93: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 93), + "159:37: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 37), + "166:37: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 37), + "181:9: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 9), + "188:9: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 9), + "188:13: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 13), + "197:9: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 9), + "197:10: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 10), + "201:49: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 49), + "201:50: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 50), + "204:75: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 75), + "204:76: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 76), + "204:77: " + getCheckMessage(MSG_KEY_LINE_NEW, "}", 77), + "208:76: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 76), + "216:27: " + getCheckMessage(MSG_KEY_LINE_ALONE, "}", 27), }; verify(checkConfig, getPath("InputRightCurlyAnnotations.java"), expected); diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/ParameterNameCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/ParameterNameCheckTest.java index 9c54f9204..52cf2824f 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/ParameterNameCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/naming/ParameterNameCheckTest.java @@ -46,7 +46,7 @@ public class ParameterNameCheckTest createCheckConfig(ParameterNameCheck.class); checkConfig.addAttribute("format", "^NO_WAY_MATEY$"); final String[] expected = ArrayUtils.EMPTY_STRING_ARRAY; - verify(checkConfig, getPath("InputLeftCurlyOther.java"), expected); + verify(checkConfig, getPath("checks/naming/InputCatchOnly.java"), expected); } @Test |