diff options
Diffstat (limited to 'src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheckTest.java')
-rw-r--r-- | src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheckTest.java | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheckTest.java index eccf7ec67..6e407a47f 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheckTest.java @@ -20,6 +20,7 @@ package com.puppycrawl.tools.checkstyle.checks.coding; import static com.puppycrawl.tools.checkstyle.checks.coding.ReturnCountCheck.MSG_KEY; +import static com.puppycrawl.tools.checkstyle.checks.coding.ReturnCountCheck.MSG_KEY_VOID; import static org.junit.Assert.assertTrue; import java.io.File; @@ -48,9 +49,9 @@ public class ReturnCountCheckTest extends AbstractModuleTestSupport { final DefaultConfiguration checkConfig = createModuleConfig(ReturnCountCheck.class); final String[] expected = { - "18:5: " + getCheckMessage(MSG_KEY, 7, 1), - "30:5: " + getCheckMessage(MSG_KEY, 2, 1), - "35:17: " + getCheckMessage(MSG_KEY, 6, 1), + "18:5: " + getCheckMessage(MSG_KEY_VOID, 7, 1), + "30:5: " + getCheckMessage(MSG_KEY_VOID, 2, 1), + "35:17: " + getCheckMessage(MSG_KEY_VOID, 6, 1), "49:5: " + getCheckMessage(MSG_KEY, 7, 2), }; verify(checkConfig, getPath("InputReturnCountSwitches.java"), expected); @@ -63,9 +64,9 @@ public class ReturnCountCheckTest extends AbstractModuleTestSupport { checkConfig.addAttribute("format", "^$"); final String[] expected = { "5:5: " + getCheckMessage(MSG_KEY, 7, 2), - "18:5: " + getCheckMessage(MSG_KEY, 7, 1), - "30:5: " + getCheckMessage(MSG_KEY, 2, 1), - "35:17: " + getCheckMessage(MSG_KEY, 6, 1), + "18:5: " + getCheckMessage(MSG_KEY_VOID, 7, 1), + "30:5: " + getCheckMessage(MSG_KEY_VOID, 2, 1), + "35:17: " + getCheckMessage(MSG_KEY_VOID, 6, 1), "49:5: " + getCheckMessage(MSG_KEY, 7, 2), }; verify(checkConfig, getPath("InputReturnCountSwitches.java"), expected); @@ -146,10 +147,11 @@ public class ReturnCountCheckTest extends AbstractModuleTestSupport { checkConfig.addAttribute("max", "2"); checkConfig.addAttribute("maxForVoid", "0"); final String[] expected = { - "4:5: " + getCheckMessage(MSG_KEY, 1, 0), - "8:5: " + getCheckMessage(MSG_KEY, 1, 0), - "14:5: " + getCheckMessage(MSG_KEY, 2, 0), + "4:5: " + getCheckMessage(MSG_KEY_VOID, 1, 0), + "8:5: " + getCheckMessage(MSG_KEY_VOID, 1, 0), + "14:5: " + getCheckMessage(MSG_KEY_VOID, 2, 0), "30:5: " + getCheckMessage(MSG_KEY, 3, 2), + "41:5: " + getCheckMessage(MSG_KEY_VOID, 2, 0), }; verify(checkConfig, getPath("InputReturnCountVoid.java"), expected); } |