Move across to the correct package
This commit is contained in:
parent
09b3756690
commit
de9f3e7b88
|
|
@ -1,5 +1,6 @@
|
|||
package com.puppycrawl.tools.checkstyle;
|
||||
|
||||
import com.puppycrawl.tools.checkstyle.checks.*;
|
||||
import com.puppycrawl.tools.checkstyle.checks.AvoidStarImportTest;
|
||||
import com.puppycrawl.tools.checkstyle.checks.ConstantNameCheckTest;
|
||||
import com.puppycrawl.tools.checkstyle.checks.EmptyBlockCheckTest;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.puppycrawl.tools.checkstyle;
|
||||
package com.puppycrawl.tools.checkstyle.checks;
|
||||
|
||||
import com.puppycrawl.tools.checkstyle.checks.RedundantModifierCheck;
|
||||
import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
|
||||
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
|
||||
|
||||
public class RedundantModifierTest
|
||||
extends BaseCheckTestCase
|
||||
|
|
@ -10,12 +11,10 @@ public class RedundantModifierTest
|
|||
{
|
||||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(RedundantModifierCheck.class);
|
||||
final Checker c = createChecker(checkConfig);
|
||||
final String fname = getPath("InputModifier.java");
|
||||
final String[] expected = {
|
||||
"32:9: Redundant 'public' modifier.",
|
||||
"38:9: Redundant 'abstract' modifier.",
|
||||
};
|
||||
verify(c, fname, expected);
|
||||
verify(checkConfig, getPath("InputModifier.java"), expected);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.puppycrawl.tools.checkstyle;
|
||||
package com.puppycrawl.tools.checkstyle.checks;
|
||||
|
||||
import com.puppycrawl.tools.checkstyle.checks.RightCurlyCheck;
|
||||
import com.puppycrawl.tools.checkstyle.checks.RightCurlyOption;
|
||||
import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
|
||||
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
|
||||
|
||||
public class RightCurlyCheckTest
|
||||
extends BaseCheckTestCase
|
||||
|
|
@ -11,15 +11,13 @@ public class RightCurlyCheckTest
|
|||
{
|
||||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(RightCurlyCheck.class);
|
||||
final Checker c = createChecker(checkConfig);
|
||||
final String fname = getPath("InputLeftCurlyOther.java");
|
||||
final String[] expected = {
|
||||
"25:17: '}' should be on the same line.",
|
||||
"28:17: '}' should be on the same line.",
|
||||
"40:13: '}' should be on the same line.",
|
||||
"44:13: '}' should be on the same line.",
|
||||
};
|
||||
verify(c, fname, expected);
|
||||
verify(checkConfig, getPath("InputLeftCurlyOther.java"), expected);
|
||||
}
|
||||
|
||||
public void testSame()
|
||||
|
|
@ -28,15 +26,13 @@ public class RightCurlyCheckTest
|
|||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(RightCurlyCheck.class);
|
||||
checkConfig.addAttribute("option", RightCurlyOption.SAME.toString());
|
||||
final Checker c = createChecker(checkConfig);
|
||||
final String fname = getPath("InputLeftCurlyOther.java");
|
||||
final String[] expected = {
|
||||
"25:17: '}' should be on the same line.",
|
||||
"28:17: '}' should be on the same line.",
|
||||
"40:13: '}' should be on the same line.",
|
||||
"44:13: '}' should be on the same line.",
|
||||
};
|
||||
verify(c, fname, expected);
|
||||
verify(checkConfig, getPath("InputLeftCurlyOther.java"), expected);
|
||||
}
|
||||
|
||||
public void testAlone()
|
||||
|
|
@ -45,10 +41,8 @@ public class RightCurlyCheckTest
|
|||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(RightCurlyCheck.class);
|
||||
checkConfig.addAttribute("option", RightCurlyOption.ALONE.toString());
|
||||
final Checker c = createChecker(checkConfig);
|
||||
final String fname = getPath("InputLeftCurlyOther.java");
|
||||
final String[] expected = {
|
||||
};
|
||||
verify(c, fname, expected);
|
||||
verify(checkConfig, getPath("InputLeftCurlyOther.java"), expected);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.puppycrawl.tools.checkstyle;
|
||||
package com.puppycrawl.tools.checkstyle.checks;
|
||||
|
||||
import com.puppycrawl.tools.checkstyle.checks.SimplifyBooleanExpressionCheck;
|
||||
import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
|
||||
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
|
||||
|
||||
public class SimplifyBooleanExpressionCheckTest
|
||||
extends BaseCheckTestCase
|
||||
|
|
@ -10,8 +11,6 @@ public class SimplifyBooleanExpressionCheckTest
|
|||
{
|
||||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(SimplifyBooleanExpressionCheck.class);
|
||||
final Checker c = createChecker(checkConfig);
|
||||
final String fname = getPath("InputSimplifyBoolean.java");
|
||||
final String[] expected = {
|
||||
"20:18: Expression can be simplified.",
|
||||
"41:36: Expression can be simplified.",
|
||||
|
|
@ -21,6 +20,6 @@ public class SimplifyBooleanExpressionCheckTest
|
|||
// TODO: Change Check.log to avoid duplicate messages
|
||||
"43:32: Expression can be simplified.",
|
||||
};
|
||||
verify(c, fname, expected);
|
||||
verify(checkConfig, getPath("InputSimplifyBoolean.java"), expected);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.puppycrawl.tools.checkstyle;
|
||||
package com.puppycrawl.tools.checkstyle.checks;
|
||||
|
||||
import com.puppycrawl.tools.checkstyle.checks.SimplifyBooleanReturnCheck;
|
||||
import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
|
||||
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
|
||||
|
||||
/*
|
||||
* Created by IntelliJ IDEA.
|
||||
|
|
@ -17,12 +18,10 @@ public class SimplifyBooleanReturnCheckTest
|
|||
{
|
||||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(SimplifyBooleanReturnCheck.class);
|
||||
final Checker c = createChecker(checkConfig);
|
||||
final String fname = getPath("InputSimplifyBoolean.java");
|
||||
final String[] expected = {
|
||||
"20:9: Remove conditional logic.",
|
||||
"33:9: Remove conditional logic.",
|
||||
};
|
||||
verify(c, fname, expected);
|
||||
verify(checkConfig, getPath("InputSimplifyBoolean.java"), expected);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.puppycrawl.tools.checkstyle;
|
||||
package com.puppycrawl.tools.checkstyle.checks;
|
||||
|
||||
import com.puppycrawl.tools.checkstyle.checks.StaticVariableNameCheck;
|
||||
import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
|
||||
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
|
||||
|
||||
public class StaticVariableNameCheckTest
|
||||
extends BaseCheckTestCase
|
||||
|
|
@ -11,12 +12,10 @@ public class StaticVariableNameCheckTest
|
|||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(StaticVariableNameCheck.class);
|
||||
checkConfig.addAttribute("format", "^s[A-Z][a-zA-Z0-9]*$");
|
||||
final Checker c = createChecker(checkConfig);
|
||||
final String fname = getPath("InputSimple.java");
|
||||
final String[] expected = {
|
||||
"30:24: Name 'badStatic' must match pattern '^s[A-Z][a-zA-Z0-9]*$'.",
|
||||
};
|
||||
verify(c, fname, expected);
|
||||
verify(checkConfig, getPath("InputSimple.java"), expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.puppycrawl.tools.checkstyle;
|
||||
package com.puppycrawl.tools.checkstyle.checks;
|
||||
|
||||
import com.puppycrawl.tools.checkstyle.checks.TabCharacterCheck;
|
||||
import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
|
||||
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
|
||||
|
||||
public class TabCharacterCheckTest
|
||||
extends BaseCheckTestCase
|
||||
|
|
@ -9,8 +10,6 @@ public class TabCharacterCheckTest
|
|||
{
|
||||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(TabCharacterCheck.class);
|
||||
final Checker c = createChecker(checkConfig);
|
||||
final String fname = getPath("InputSimple.java");
|
||||
final String[] expected = {
|
||||
"19:25: Line contains a tab character.",
|
||||
"145:35: Line contains a tab character.",
|
||||
|
|
@ -21,6 +20,6 @@ public class TabCharacterCheckTest
|
|||
"157:3: Line contains a tab character.",
|
||||
"158:3: Line contains a tab character."
|
||||
};
|
||||
verify(c, fname, expected);
|
||||
verify(checkConfig, getPath("InputSimple.java"), expected);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.puppycrawl.tools.checkstyle;
|
||||
package com.puppycrawl.tools.checkstyle.checks;
|
||||
|
||||
import com.puppycrawl.tools.checkstyle.checks.TodoCommentCheck;
|
||||
import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
|
||||
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
|
||||
|
||||
public class TodoCommentCheckTest
|
||||
extends BaseCheckTestCase
|
||||
|
|
@ -11,14 +12,12 @@ public class TodoCommentCheckTest
|
|||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(TodoCommentCheck.class);
|
||||
checkConfig.addAttribute("format", "FIXME:");
|
||||
final Checker c = createChecker(checkConfig);
|
||||
final String fname = getPath("InputSimple.java");
|
||||
final String[] expected = {
|
||||
"161: Comment matches to-do format 'FIXME:'.",
|
||||
"162: Comment matches to-do format 'FIXME:'.",
|
||||
"163: Comment matches to-do format 'FIXME:'.",
|
||||
"167: Comment matches to-do format 'FIXME:'.",
|
||||
};
|
||||
verify(c, fname, expected);
|
||||
verify(checkConfig, getPath("InputSimple.java"), expected);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.puppycrawl.tools.checkstyle;
|
||||
package com.puppycrawl.tools.checkstyle.checks;
|
||||
|
||||
import com.puppycrawl.tools.checkstyle.checks.TypeLeftCurlyCheck;
|
||||
import com.puppycrawl.tools.checkstyle.checks.LeftCurlyOption;
|
||||
import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
|
||||
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
|
||||
|
||||
public class TypeLeftCurlyCheckTest
|
||||
extends BaseCheckTestCase
|
||||
|
|
@ -11,8 +11,6 @@ public class TypeLeftCurlyCheckTest
|
|||
{
|
||||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(TypeLeftCurlyCheck.class);
|
||||
final Checker c = createChecker(checkConfig);
|
||||
final String fname = getPath("InputScopeInnerInterfaces.java");
|
||||
final String[] expected = {
|
||||
"8:1: '{' should be on the previous line.",
|
||||
"12:5: '{' should be on the previous line.",
|
||||
|
|
@ -20,7 +18,7 @@ public class TypeLeftCurlyCheckTest
|
|||
"30:5: '{' should be on the previous line.",
|
||||
"39:5: '{' should be on the previous line.",
|
||||
};
|
||||
verify(c, fname, expected);
|
||||
verify(checkConfig, getPath("InputScopeInnerInterfaces.java"), expected);
|
||||
}
|
||||
|
||||
public void testNL()
|
||||
|
|
@ -29,11 +27,9 @@ public class TypeLeftCurlyCheckTest
|
|||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(TypeLeftCurlyCheck.class);
|
||||
checkConfig.addAttribute("option", LeftCurlyOption.NL.toString());
|
||||
final Checker c = createChecker(checkConfig);
|
||||
final String fname = getPath("InputScopeInnerInterfaces.java");
|
||||
final String[] expected = {
|
||||
};
|
||||
verify(c, fname, expected);
|
||||
verify(checkConfig, getPath("InputScopeInnerInterfaces.java"), expected);
|
||||
}
|
||||
|
||||
public void testNLOW()
|
||||
|
|
@ -42,8 +38,6 @@ public class TypeLeftCurlyCheckTest
|
|||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(TypeLeftCurlyCheck.class);
|
||||
checkConfig.addAttribute("option", LeftCurlyOption.NLOW.toString());
|
||||
final Checker c = createChecker(checkConfig);
|
||||
final String fname = getPath("InputScopeInnerInterfaces.java");
|
||||
final String[] expected = {
|
||||
"8:1: '{' should be on the previous line.",
|
||||
"12:5: '{' should be on the previous line.",
|
||||
|
|
@ -51,6 +45,6 @@ public class TypeLeftCurlyCheckTest
|
|||
"30:5: '{' should be on the previous line.",
|
||||
"39:5: '{' should be on the previous line.",
|
||||
};
|
||||
verify(c, fname, expected);
|
||||
verify(checkConfig, getPath("InputScopeInnerInterfaces.java"), expected);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.puppycrawl.tools.checkstyle;
|
||||
package com.puppycrawl.tools.checkstyle.checks;
|
||||
|
||||
import com.puppycrawl.tools.checkstyle.checks.TypeNameCheck;
|
||||
import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
|
||||
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
|
||||
|
||||
public class TypeNameCheckTest
|
||||
extends BaseCheckTestCase
|
||||
|
|
@ -11,11 +12,9 @@ public class TypeNameCheckTest
|
|||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(TypeNameCheck.class);
|
||||
checkConfig.addAttribute("format", "^inputHe");
|
||||
final Checker c = createChecker(checkConfig);
|
||||
final String fname = getPath("inputHeader.java");
|
||||
final String[] expected = {
|
||||
};
|
||||
verify(c, fname, expected);
|
||||
verify(checkConfig, getPath("inputHeader.java"), expected);
|
||||
}
|
||||
|
||||
public void testDefault()
|
||||
|
|
@ -23,11 +22,9 @@ public class TypeNameCheckTest
|
|||
{
|
||||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(TypeNameCheck.class);
|
||||
final Checker c = createChecker(checkConfig);
|
||||
final String fname = getPath("inputHeader.java");
|
||||
final String[] expected = {
|
||||
"1:48: Name 'inputHeader' must match pattern '^[A-Z][a-zA-Z0-9]*$'."
|
||||
};
|
||||
verify(c, fname, expected);
|
||||
verify(checkConfig, getPath("inputHeader.java"), expected);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package com.puppycrawl.tools.checkstyle;
|
||||
package com.puppycrawl.tools.checkstyle.checks;
|
||||
|
||||
import com.puppycrawl.tools.checkstyle.checks.UpperEllCheck;
|
||||
import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
|
||||
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
|
||||
|
||||
public class UpperEllCheckTest
|
||||
extends BaseCheckTestCase
|
||||
|
|
@ -10,11 +11,9 @@ public class UpperEllCheckTest
|
|||
{
|
||||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(UpperEllCheck.class);
|
||||
final Checker c = createChecker(checkConfig);
|
||||
final String fname = getPath("InputSemantic.java");
|
||||
final String[] expected = {
|
||||
"94:43: Should use uppercase 'L'.",
|
||||
};
|
||||
verify(c, fname, expected);
|
||||
verify(checkConfig, getPath("InputSemantic.java"), expected);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue