Move across to the correct package

This commit is contained in:
Oliver Burn 2002-12-07 13:49:22 +00:00
parent 3d77a28657
commit 57bb8f3e0f
4 changed files with 18 additions and 27 deletions

View File

@ -1,6 +1,9 @@
package com.puppycrawl.tools.checkstyle;
import com.puppycrawl.tools.checkstyle.checks.AvoidStarImportTest;
import com.puppycrawl.tools.checkstyle.checks.ConstantNameCheckTest;
import com.puppycrawl.tools.checkstyle.checks.EmptyBlockCheckTest;
import com.puppycrawl.tools.checkstyle.checks.EqualsHashCodeCheckTest;
import com.puppycrawl.tools.checkstyle.checks.GenericIllegalRegexpCheckTest;
import com.puppycrawl.tools.checkstyle.checks.IllegalImportCheckTest;
import com.puppycrawl.tools.checkstyle.checks.RedundantImportCheckTest;

View File

@ -1,7 +1,8 @@
package com.puppycrawl.tools.checkstyle;
package com.puppycrawl.tools.checkstyle.checks;
import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
import com.puppycrawl.tools.checkstyle.checks.ConstantNameCheck;
public class ConstantNameCheckTest
extends BaseCheckTestCase
@ -26,13 +27,11 @@ public class ConstantNameCheckTest
{
final DefaultConfiguration checkConfig =
createCheckConfig(ConstantNameCheck.class);
final Checker c = createChecker(checkConfig);
final String fname = getPath("InputSimple.java");
final String[] expected = {
"25:29: Name 'badConstant' must match pattern '^[A-Z](_?[A-Z0-9]+)*$'.",
"142:30: Name 'BAD__NAME' must match pattern '^[A-Z](_?[A-Z0-9]+)*$'."
};
verify(c, fname, expected);
verify(checkConfig, getPath("InputSimple.java"), expected);
}
public void testInterface()
@ -40,11 +39,9 @@ public class ConstantNameCheckTest
{
final DefaultConfiguration checkConfig =
createCheckConfig(ConstantNameCheck.class);
final Checker c = createChecker(checkConfig);
final String fname = getPath("InputInner.java");
final String[] expected = {
"24:16: Name 'data' must match pattern '^[A-Z](_?[A-Z0-9]+)*$'."
};
verify(c, fname, expected);
verify(checkConfig, getPath("InputInner.java"), expected);
}
}

View File

@ -1,7 +1,7 @@
package com.puppycrawl.tools.checkstyle;
package com.puppycrawl.tools.checkstyle.checks;
import com.puppycrawl.tools.checkstyle.checks.EmptyBlockCheck;
import com.puppycrawl.tools.checkstyle.checks.BlockOption;
import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
public class EmptyBlockCheckTest
extends BaseCheckTestCase
@ -11,8 +11,6 @@ public class EmptyBlockCheckTest
{
final DefaultConfiguration checkConfig =
createCheckConfig(EmptyBlockCheck.class);
final Checker c = createChecker(checkConfig);
final String fname = getPath("InputSemantic.java");
final String[] expected = {
"52:65: Must have at least one statement.",
"54:41: Must have at least one statement.",
@ -24,7 +22,7 @@ public class EmptyBlockCheckTest
"79:13: Must have at least one statement.",
"82:17: Must have at least one statement.",
};
verify(c, fname, expected);
verify(checkConfig, getPath("InputSemantic.java"), expected);
}
public void testText()
@ -33,8 +31,6 @@ public class EmptyBlockCheckTest
final DefaultConfiguration checkConfig =
createCheckConfig(EmptyBlockCheck.class);
checkConfig.addAttribute("option", BlockOption.TEXT.toString());
final Checker c = createChecker(checkConfig);
final String fname = getPath("InputSemantic.java");
final String[] expected = {
"52:65: Empty catch block.",
"72:52: Empty catch block.",
@ -42,7 +38,7 @@ public class EmptyBlockCheckTest
"75:13: Empty try block.",
"77:17: Empty finally block.",
};
verify(c, fname, expected);
verify(checkConfig, getPath("InputSemantic.java"), expected);
}
public void testStatement()
@ -51,8 +47,6 @@ public class EmptyBlockCheckTest
final DefaultConfiguration checkConfig =
createCheckConfig(EmptyBlockCheck.class);
checkConfig.addAttribute("option", BlockOption.STMT.toString());
final Checker c = createChecker(checkConfig);
final String fname = getPath("InputSemantic.java");
final String[] expected = {
"52:65: Must have at least one statement.",
"54:41: Must have at least one statement.",
@ -64,6 +58,6 @@ public class EmptyBlockCheckTest
"79:13: Must have at least one statement.",
"82:17: Must have at least one statement.",
};
verify(c, fname, expected);
verify(checkConfig, getPath("InputSemantic.java"), expected);
}
}

View File

@ -1,6 +1,7 @@
package com.puppycrawl.tools.checkstyle;
package com.puppycrawl.tools.checkstyle.checks;
import com.puppycrawl.tools.checkstyle.checks.EqualsHashCodeCheck;
import com.puppycrawl.tools.checkstyle.BaseCheckTestCase;
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
public class EqualsHashCodeCheckTest
extends BaseCheckTestCase
@ -9,14 +10,10 @@ public class EqualsHashCodeCheckTest
{
final DefaultConfiguration checkConfig =
createCheckConfig(EqualsHashCodeCheck.class);
final Checker c = createChecker(checkConfig);
final String fname = getPath("InputSemantic.java");
final String[] expected = {
"126:9: Definition of 'equals()' without corresponding defnition of 'hashCode()'.",
"163:13: Definition of 'equals()' without corresponding defnition of 'hashCode()'.",
};
verify(c, fname, expected);
verify(checkConfig, getPath("InputSemantic.java"), expected);
}
}