Package Annotation Check compilbale UT input

This commit is contained in:
alexkravin 2014-12-02 19:13:01 +04:00 committed by Roman Ivanov
parent 2efbd52f77
commit a94d50133e
3 changed files with 0 additions and 62 deletions

View File

@ -25,40 +25,6 @@ import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
public class PackageAnnotationTest extends BaseCheckTestSupport
{
/**
* This tests 1 package annotation that is not in the package-info.java file.
*
* @throws Exception
*/
@Test
public void testBadPackageAnnotation1() throws Exception
{
DefaultConfiguration checkConfig = createCheckConfig(PackageAnnotationCheck.class);
final String[] expected = {
"0: Package annotations must be in the package-info.java info.",
};
verify(checkConfig, getPath("annotation" + File.separator + "BadPackageAnnotation1.java"), expected);
}
/**
* This tests 2 package annotations that are not in the package-info.java file.
*
* @throws Exception
*/
@Test
public void testBadPackageAnnotation2() throws Exception
{
DefaultConfiguration checkConfig = createCheckConfig(PackageAnnotationCheck.class);
final String[] expected = {
"0: Package annotations must be in the package-info.java info.",
};
verify(checkConfig, getPath("annotation" + File.separator + "BadPackageAnnotation2.java"), expected);
}
/**
* This tests a package annotation that is in the package-info.java file.
*

View File

@ -1,12 +0,0 @@
@GunNRoses //this will not compile in Sun's compiler as of 1.6.0.11
package com.puppycrawl.tools.checkstyle.annotation;
public class BadPackageAnnotation1
{
}
@interface GunNRoses {
}

View File

@ -1,16 +0,0 @@
@Package//this will not compile in Sun's compiler as of 1.6.0.11
@Metallica
package com.puppycrawl.tools.checkstyle.annotation;
public class BadPackageAnnotation2
{
}
@interface Package {
}
@interface Metallica {
}