Skip to content

Commit

Permalink
Issue #2161: Add "Input" prefix to test input files
Browse files Browse the repository at this point in the history
  • Loading branch information
mkordas committed Sep 19, 2015
1 parent 79a7478 commit 3baf36b
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 8 deletions.
@@ -1,6 +1,6 @@
package com.google.checkstyle.test.chapter3filestructure.rule341onetoplevel; package com.google.checkstyle.test.chapter3filestructure.rule341onetoplevel;


public enum OneTopLevelClassBad3 {} //ok public enum InputOneTopLevelClassBad3 {} //ok


interface FooIn {} // warn interface FooIn {} // warn


Expand Down
Expand Up @@ -327,7 +327,7 @@ public void testAnonClassesFromGuava() throws Exception {
checkConfig.addAttribute("tabWidth", "4"); checkConfig.addAttribute("tabWidth", "4");
checkConfig.addAttribute("throwsIndent", "4"); checkConfig.addAttribute("throwsIndent", "4");
final String[] expected = ArrayUtils.EMPTY_STRING_ARRAY; final String[] expected = ArrayUtils.EMPTY_STRING_ARRAY;
verifyWarns(checkConfig, getPath("indentation/FromGuava2.java"), expected); verifyWarns(checkConfig, getPath("indentation/InputFromGuava2.java"), expected);
} }


@Test @Test
Expand All @@ -343,7 +343,7 @@ public void testAnnotations() throws Exception {
checkConfig.addAttribute("tabWidth", "4"); checkConfig.addAttribute("tabWidth", "4");
checkConfig.addAttribute("throwsIndent", "4"); checkConfig.addAttribute("throwsIndent", "4");
final String[] expected = ArrayUtils.EMPTY_STRING_ARRAY; final String[] expected = ArrayUtils.EMPTY_STRING_ARRAY;
verifyWarns(checkConfig, getPath("indentation/FromGuava.java"), expected); verifyWarns(checkConfig, getPath("indentation/InputFromGuava.java"), expected);
} }


@Test @Test
Expand Down
Expand Up @@ -45,7 +45,7 @@ public void testFP() throws Exception {
final DefaultConfiguration checkConfig = final DefaultConfiguration checkConfig =
createCheckConfig(JavadocTagContinuationIndentationCheck.class); createCheckConfig(JavadocTagContinuationIndentationCheck.class);
final String[] expected = ArrayUtils.EMPTY_STRING_ARRAY; final String[] expected = ArrayUtils.EMPTY_STRING_ARRAY;
verify(checkConfig, getPath("javadoc/GuavaFP.java"), expected); verify(checkConfig, getPath("javadoc/InputGuavaFalsePositive.java"), expected);
} }


@Test @Test
Expand Down
Expand Up @@ -3,7 +3,6 @@
import java.util.Map; //indent:0 exp:0 import java.util.Map; //indent:0 exp:0
import java.util.Map.Entry; //indent:0 exp:0 import java.util.Map.Entry; //indent:0 exp:0


import com.google.common.collect.ImmutableList; //indent:0 exp:0
import com.google.common.collect.Range; //indent:0 exp:0 import com.google.common.collect.Range; //indent:0 exp:0
import com.google.common.collect.RangeMap; //indent:0 exp:0 import com.google.common.collect.RangeMap; //indent:0 exp:0


Expand All @@ -21,9 +20,9 @@
* //indent:1 exp:1 * //indent:1 exp:1
* //indent:1 exp:1 * //indent:1 exp:1
*/ //indent:1 exp:1 */ //indent:1 exp:1
public class FromGuava2<K extends Comparable<?>, V> implements RangeMap<K, V> { //indent:0 exp:0 public class InputFromGuava2<K extends Comparable<?>, V> implements RangeMap<K, V> { //indent:0 exp:0


public FromGuava2<K, V> subRangeMap1(final Range<K> range) { //indent:2 exp:2 public InputFromGuava2<K, V> subRangeMap1(final Range<K> range) { //indent:2 exp:2
Range<K> ranges = null; //indent:4 exp:4 Range<K> ranges = null; //indent:4 exp:4
if (checkNotNull(range).isEmpty()) { //indent:4 exp:4 if (checkNotNull(range).isEmpty()) { //indent:4 exp:4
} else if (ranges.isEmpty() || range.encloses(span())) { //indent:4 exp:4 } else if (ranges.isEmpty() || range.encloses(span())) { //indent:4 exp:4
Expand All @@ -36,7 +35,7 @@ public FromGuava2<K, V> subRangeMap1(final Range<K> range) { //indent:2 exp:2
} //indent:4 exp:4 } //indent:4 exp:4
final int off = lowerIndex; //indent:4 exp:4 final int off = lowerIndex; //indent:4 exp:4
final int len = upperIndex - lowerIndex; //indent:4 exp:4 final int len = upperIndex - lowerIndex; //indent:4 exp:4
FromGuava2<K, V> outer = null; //indent:4 exp:4 InputFromGuava2<K, V> outer = null; //indent:4 exp:4
return outer; //indent:4 exp:4 return outer; //indent:4 exp:4
} //indent:2 exp:2 } //indent:2 exp:2


Expand Down

0 comments on commit 3baf36b

Please sign in to comment.