diff options
author | rnveach <rveach02@gmail.com> | 2016-06-03 08:54:20 -0400 |
---|---|---|
committer | Roman Ivanov <romani@users.noreply.github.com> | 2016-06-03 05:54:20 -0700 |
commit | 9dbd6a73efb40ecd01505ca7b124b5f5c63ccd7d (patch) | |
tree | 2d77cc5488f5e0bf4352880bf85c2be6b6f52263 /src/test | |
parent | 58b4d15a3ac8c494ffcea37d8670249565efd595 (diff) | |
download | checkstyle-9dbd6a73efb40ecd01505ca7b124b5f5c63ccd7d.tar.gz |
Issue #3116: removed requirement right curlies must be first on line (#3222)
Diffstat (limited to 'src/test')
4 files changed, 4 insertions, 8 deletions
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java index c4f496926..478583417 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java @@ -1039,7 +1039,6 @@ public class IndentationCheckTest extends BaseCheckTestSupport { "225: " + getCheckMessage(MSG_ERROR, "if", 10, 12), "229: " + getCheckMessage(MSG_CHILD_ERROR, "if", 18, 20), - "233: " + getCheckMessage(MSG_ERROR, "if rcurly", 40, 8), "240: " + getCheckMessage(MSG_ERROR, "if rparen", 10, 8), "245: " + getCheckMessage(MSG_ERROR, "if rparen", 6, 8), "251: " + getCheckMessage(MSG_ERROR, "if lparen", 6, 8), @@ -1112,9 +1111,7 @@ public class IndentationCheckTest extends BaseCheckTestSupport { checkConfig.addAttribute("tabWidth", "4"); checkConfig.addAttribute("throwsIndent", "4"); final String fileName = getPath("InputInvalidAnonymousClassIndent.java"); - final String[] expected = { - "28: " + getCheckMessage(MSG_ERROR_MULTI, "method def rcurly", 17, "12, 16"), - }; + final String[] expected = CommonUtils.EMPTY_STRING_ARRAY; verifyWarns(checkConfig, fileName, expected); } @@ -1153,7 +1150,6 @@ public class IndentationCheckTest extends BaseCheckTestSupport { "70: " + getCheckMessage(MSG_CHILD_ERROR, "for", 10, 12), "71: " + getCheckMessage(MSG_CHILD_ERROR, "for", 14, 16), "72: " + getCheckMessage(MSG_CHILD_ERROR, "for", 10, 12), - "77: " + getCheckMessage(MSG_ERROR, "for rcurly", 39, 8), "81: " + getCheckMessage(MSG_ERROR, "for rparen", 12, 8), }; verifyWarns(checkConfig, fileName, expected); diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/indentation/InputInvalidAnonymousClassIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/indentation/InputInvalidAnonymousClassIndent.java index 5e84c1e64..b2d5e7e85 100644 --- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/indentation/InputInvalidAnonymousClassIndent.java +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/indentation/InputInvalidAnonymousClassIndent.java @@ -25,7 +25,7 @@ public class InputInvalidAnonymousClassIndent { //indent:0 exp:0 return new Thread(); //indent:20 exp:20 } else { //indent:16 exp:16 return new Thread(); //indent:20 exp:20 - }}}); //indent:16 ioffset:1 exp:12,16 warn + }}}); //indent:16 exp:16 return; //indent:8 exp:8 } //indent:4 exp:4 } //indent:0 exp:0 diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/indentation/InputInvalidForIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/indentation/InputInvalidForIndent.java index a8ef88bf6..4f7776c9a 100644 --- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/indentation/InputInvalidForIndent.java +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/indentation/InputInvalidForIndent.java @@ -74,7 +74,7 @@ public class InputInvalidForIndent { //indent:0 exp:0 } //indent:8 exp:8 for (int i=0; i<10; i++) { //indent:8 exp:8 - System.getProperty("foo"); } //indent:12 ioffset:27 exp:8 warn + System.getProperty("foo"); } //indent:12 exp:12 for (int i=0; //indent:8 exp:8 i<10; i++ //indent:12 exp:>=12 diff --git a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/indentation/InputInvalidIfIndent.java b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/indentation/InputInvalidIfIndent.java index b58081a60..f33f8a6d9 100644 --- a/src/test/resources/com/puppycrawl/tools/checkstyle/checks/indentation/InputInvalidIfIndent.java +++ b/src/test/resources/com/puppycrawl/tools/checkstyle/checks/indentation/InputInvalidIfIndent.java @@ -230,7 +230,7 @@ System.getProperty("blah"); //indent:0 exp:12 warn } //indent:16 exp:16 if (test) { //indent:8 exp:8 - System.getProperty("blah"); } //indent:12 ioffset:28 exp:8 warn + System.getProperty("blah"); } //indent:12 exp:12 } //indent:4 exp:4 public void parenIfTest() { //indent:4 exp:4 |