Skip to content

Commit

Permalink
Redundant Return Check Test updated formatting to match 'Checkstyle f…
Browse files Browse the repository at this point in the history
…or Checkstyle config'
  • Loading branch information
alexkravin authored and Daniil Yaroslavtsev committed Sep 1, 2014
1 parent 00f3724 commit 17f4fdd
Showing 1 changed file with 23 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,19 @@ public void testInputWithIgnoreEmptyConstructorsTrue() throws Exception {
final DefaultConfiguration checkConfig = createCheckConfig(RedundantReturnCheck.class);
checkConfig.addAttribute("allowReturnInEmptyMethodsAndConstructors", "false");

final String[] expected = { "10: Redundant return.",
"17: Redundant return.", "22: Redundant return.",
"32: Redundant return.", "39: Redundant return.",
"52: Redundant return.", "56: Redundant return.",
"60: Redundant return.", "87: Redundant return.",
"100: Redundant return.", "104: Redundant return."
};
final String[] expected = {
"10: Redundant return.",
"17: Redundant return.",
"22: Redundant return.",
"32: Redundant return.",
"39: Redundant return.",
"52: Redundant return.",
"56: Redundant return.",
"60: Redundant return.",
"87: Redundant return.",
"100: Redundant return.",
"104: Redundant return."
};

verify(checkConfig, getPath("InputRedundantReturn.java"), expected);
}
Expand All @@ -28,12 +34,16 @@ public void testInputWithIgnoreEmptyConstructorsFalse() throws Exception {
final DefaultConfiguration checkConfig = createCheckConfig(RedundantReturnCheck.class);
checkConfig.addAttribute("allowReturnInEmptyMethodsAndConstructors", "true");

final String[] expected = { "17: Redundant return.",
"32: Redundant return.", "39: Redundant return.",
"52: Redundant return.", "56: Redundant return.",
"60: Redundant return.", "100: Redundant return.",
"104: Redundant return."
};
final String[] expected = {
"17: Redundant return.",
"32: Redundant return.",
"39: Redundant return.",
"52: Redundant return.",
"56: Redundant return.",
"60: Redundant return.",
"100: Redundant return.",
"104: Redundant return."
};

verify(checkConfig, getPath("InputRedundantReturn.java"), expected);

Expand Down

0 comments on commit 17f4fdd

Please sign in to comment.