Skip to content

Commit

Permalink
Issue checkstyle#4313: Split and Organize Checkstyle inputs by Test f…
Browse files Browse the repository at this point in the history
…or checks in annotation package: MissingDeprecated
  • Loading branch information
Kietzmann authored and timurt committed May 6, 2017
1 parent 935209d commit 477e5ce
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ public class MissingDeprecatedCheckTest extends BaseCheckTestSupport {
@Override
protected String getPath(String filename) throws IOException {
return super.getPath("checks" + File.separator
+ "annotation" + File.separator + filename);
+ "annotation" + File.separator
+ "missingdeprecated" + File.separator
+ filename);
}

@Test
Expand Down Expand Up @@ -77,7 +79,7 @@ public void testBadDeprecatedAnnotation() throws Exception {
"56: " + getCheckMessage(MSG_KEY_ANNOTATION_MISSING_DEPRECATED),
};

verify(checkConfig, getPath("InputBadDeprecatedAnnotation.java"), expected);
verify(checkConfig, getPath("InputMissingDeprecatedBadDeprecated.java"), expected);
}

/**
Expand All @@ -100,7 +102,7 @@ public void testBadDeprecatedJavadoc() throws Exception {
"55: " + getCheckMessage(MSG_KEY_ANNOTATION_MISSING_DEPRECATED),
};

verify(checkConfig, getPath("InputBadDeprecatedJavadoc.java"), expected);
verify(checkConfig, getPath("InputMissingDeprecatedBadJavadoc.java"), expected);
}

/**
Expand All @@ -127,7 +129,7 @@ public void testSpecialCaseDeprecated() throws Exception {
"51: " + getCheckMessage(MSG_KEY_JAVADOC_DUPLICATE_TAG, "@deprecated"),
};

verify(checkConfig, getPath("InputSpecialCaseDeprecated.java"), expected);
verify(checkConfig, getPath("InputMissingDeprecatedSpecialCase.java"), expected);
}

/**
Expand All @@ -140,7 +142,7 @@ public void testGoodDeprecated() throws Exception {

final String[] expected = CommonUtils.EMPTY_STRING_ARRAY;

verify(checkConfig, getPath("InputGoodDeprecated.java"), expected);
verify(checkConfig, getPath("InputMissingDeprecatedGood.java"), expected);
}

@Test
Expand All @@ -154,7 +156,7 @@ public void testTwoInJavadocWithoutAnnotation() throws Exception {
"12: " + getCheckMessage(MSG_KEY_ANNOTATION_MISSING_DEPRECATED),
};

verify(checkConfig, getPath("InputMissingDeprecated1.java"), expected);
verify(checkConfig, getPath("InputMissingDeprecatedClass.java"), expected);
}

@Test
Expand All @@ -167,7 +169,7 @@ public void testEmptyJavadocLine() throws Exception {
"11: " + getCheckMessage(MSG_KEY_ANNOTATION_MISSING_DEPRECATED),
};

verify(checkConfig, getPath("InputMissingDeprecated2.java"), expected);
verify(checkConfig, getPath("InputMissingDeprecatedMethod.java"), expected);
}

@Test
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.puppycrawl.tools.checkstyle.checks.annotation;
package com.puppycrawl.tools.checkstyle.checks.annotation.missingdeprecated;

/**
* @deprecated
* stuff
*/
public class InputBadDeprecatedAnnotation
public class InputMissingDeprecatedBadDeprecated
{
/**
* @deprecated stuff
*/
protected InputBadDeprecatedAnnotation() {
protected InputMissingDeprecatedBadDeprecated() {

}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.puppycrawl.tools.checkstyle.checks.annotation;
package com.puppycrawl.tools.checkstyle.checks.annotation.missingdeprecated;

import java.lang.annotation.Inherited;

@Deprecated
public class InputBadDeprecatedJavadoc
public class InputMissingDeprecatedBadJavadoc
{
/**
* @Deprecated this is not the same
*/
@Deprecated
protected InputBadDeprecatedJavadoc() {
protected InputMissingDeprecatedBadJavadoc() {

}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.puppycrawl.tools.checkstyle.checks.annotation;
package com.puppycrawl.tools.checkstyle.checks.annotation.missingdeprecated;

import java.lang.annotation.Inherited;
/**
Expand All @@ -9,7 +9,7 @@
*stuff
*stuff
*/
public class InputMissingDeprecated1
public class InputMissingDeprecatedClass
{

}
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package com.puppycrawl.tools.checkstyle.checks.annotation;
package com.puppycrawl.tools.checkstyle.checks.annotation.missingdeprecated;

/**
* @deprecated
* bleh
*/
@Deprecated
public class InputGoodDeprecated
public class InputMissingDeprecatedGood
{
/**
* @deprecated bleh
*/
@Deprecated
protected InputGoodDeprecated() {
protected InputMissingDeprecatedGood() {
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.puppycrawl.tools.checkstyle.checks.annotation.missingdeprecated;

public class InputMissingDeprecatedMethod {


/**
* @deprecated
*
* @param comment
*/
public void method(){
}

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.puppycrawl.tools.checkstyle.checks.annotation;
package com.puppycrawl.tools.checkstyle.checks.annotation.missingdeprecated;

public class InputMissingDeprecatedSkipNoJavadoc {
@Deprecated
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.puppycrawl.tools.checkstyle.checks.annotation;
package com.puppycrawl.tools.checkstyle.checks.annotation.missingdeprecated;

/**
* @deprecated bleh
* @deprecated boo
*/
@Deprecated
public class InputSpecialCaseDeprecated
public class InputMissingDeprecatedSpecialCase
{
/**
* @deprecated bleh
Expand Down

0 comments on commit 477e5ce

Please sign in to comment.