Permalink
Browse files

Issue #4587: Moved all necessary resource files for OuterTypeFilename

  • Loading branch information...
Dmytro Kytsmen authored and romani committed Jul 6, 2017
1 parent 1d1c2de commit 9eb031c685f045c64e0ecddf713434a74c800730
@@ -35,12 +35,18 @@
public class OuterTypeFilenameCheckTest extends BaseCheckTestSupport {
@Override
protected String getPath(String filename) throws IOException {
return super.getPath("checks" + File.separator + filename);
return super.getPath("checks" + File.separator
+ "misc" + File.separator
+ "outertypefilename" + File.separator
+ filename);
}
@Override
protected String getNonCompilablePath(String filename) throws IOException {
return super.getNonCompilablePath("checks" + File.separator + filename);
return super.getNonCompilablePath("checks" + File.separator
+ "misc" + File.separator
+ "outertypefilename" + File.separator
+ filename);
}
@Test
@@ -61,15 +67,15 @@ public void testGood1() throws Exception {
final DefaultConfiguration checkConfig =
createCheckConfig(OuterTypeFilenameCheck.class);
final String[] expected = CommonUtils.EMPTY_STRING_ARRAY;
verify(checkConfig, getPath("InputIllegalTokens.java"), expected);
verify(checkConfig, getPath("InputOuterTypeFilenameIllegalTokens.java"), expected);
}
@Test
public void testGood2() throws Exception {
final DefaultConfiguration checkConfig =
createCheckConfig(OuterTypeFilenameCheck.class);
final String[] expected = CommonUtils.EMPTY_STRING_ARRAY;
verify(checkConfig, getPath("Input15Extensions.java"), expected);
verify(checkConfig, getPath("InputOuterTypeFilename15Extensions.java"), expected);
}
@Test
@@ -1,5 +1,5 @@
// someexamples of 1.5 extensions
package com.puppycrawl.tools.checkstyle.checks;
package com.puppycrawl.tools.checkstyle.checks.misc.outertypefilename;
public class InputOuterTypeFilename1 {
@@ -0,0 +1,36 @@
// someexamples of 1.5 extensions
package com.puppycrawl.tools.checkstyle.checks.misc.outertypefilename;
@interface MyAnnotation1 {
String name();
int version();
}
@MyAnnotation1(name = "ABC", version = 1)
public class InputOuterTypeFilename15Extensions
{
}
enum Enum1
{
A, B, C;
Enum1() {}
public String toString() {
return ""; //some custom implementation
}
}
interface TestRequireThisEnum
{
enum DAY_OF_WEEK
{
SUNDAY,
MONDAY,
TUESDAY,
WEDNESDAY,
THURSDAY,
FRIDAY,
SATURDAY
}
}
@@ -1,5 +1,5 @@
// someexamples of 1.5 extensions
package com.puppycrawl.tools.checkstyle.checks;
package com.puppycrawl.tools.checkstyle.checks.misc.outertypefilename;
public class InputOuterTypeFilename2 {
@@ -1,5 +1,5 @@
// someexamples of 1.5 extensions
package com.puppycrawl.tools.checkstyle.checks;
package com.puppycrawl.tools.checkstyle.checks.misc.outertypefilename;
class InputOuterTypeFilename3 {
@@ -1,5 +1,5 @@
// someexamples of 1.5 extensions
package com.puppycrawl.tools.checkstyle.checks;
package com.puppycrawl.tools.checkstyle.checks.misc.outertypefilename;
class InputOuterTypeFilenameCheckWrongName2 {
@@ -0,0 +1,18 @@
package com.puppycrawl.tools.checkstyle.checks.misc.outertypefilename;
public class InputOuterTypeFilenameIllegalTokens
{
public void methodWithPreviouslyIllegalTokens()
{
int i = 0;
switch (i)
{
default:
i--;
i++;
break;
}
}
public native void nativeMethod();
}

0 comments on commit 9eb031c

Please sign in to comment.