Skip to content

Commit

Permalink
Issue checkstyle#11446: Update Filesetchecktest to use verifyWithInli…
Browse files Browse the repository at this point in the history
…neConfigParser
  • Loading branch information
piyush-1234 authored and romani committed Dec 10, 2023
1 parent ac6d6f0 commit 0946950
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1824,7 +1824,6 @@
<exclude>**/RegexpHeaderCheckTest.class</exclude>

<!-- all bellow until https://github.com/checkstyle/checkstyle/issues/11446 -->
<exclude>**/FileSetCheckTest.class</exclude>
<exclude>**/AbstractFileSetCheckTest.class</exclude>
<exclude>**/DetailAstImplTest.class</exclude>
<exclude>**/TreeWalkerTest.class</exclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ protected String getPackageLocation() {

@Test
public void testTranslation() throws Exception {
final Configuration checkConfig =
createModuleConfig(TestFileSetCheck.class);
final String[] expected = CommonUtil.EMPTY_STRING_ARRAY;
verify(checkConfig, getPath("InputFileSetIllegalTokens.java"), expected);
verifyWithInlineConfigParser(getPath("InputFileSetIllegalTokens.java"), expected);

assertWithMessage("destroy() not called by Checker")
.that(TestFileSetCheck.isDestroyed())
Expand All @@ -50,11 +48,8 @@ public void testTranslation() throws Exception {

@Test
public void testProcessCallsFinishBeforeCallingDestroy() throws Exception {
final Configuration checkConfig =
createModuleConfig(TestFileSetCheck.class);
final String[] expected = CommonUtil.EMPTY_STRING_ARRAY;

verify(checkConfig, getPath("InputFileSetIllegalTokens.java"), expected);
verifyWithInlineConfigParser(getPath("InputFileSetIllegalTokens.java"), expected);

assertWithMessage("FileContent should be available during finishProcessing() call")
.that(TestFileSetCheck.isFileContentAvailable())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public final class TestInputConfiguration {
"com.puppycrawl.tools.checkstyle.checks.sizes.FileLengthCheck",
"com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck",
"com.puppycrawl.tools.checkstyle.checks.whitespace.FileTabCharacterCheck",
"com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheckTest$ViolationFileSetCheck"
"com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheckTest$ViolationFileSetCheck",
"com.puppycrawl.tools.checkstyle.api.FileSetCheckTest$TestFileSetCheck"
));

private final List<ModuleInputConfiguration> childrenModules;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
com.puppycrawl.tools.checkstyle.api.FileSetCheckTest$TestFileSetCheck
*/

package com.puppycrawl.tools.checkstyle.api.fileset;

public class InputFileSetIllegalTokens
Expand Down

0 comments on commit 0946950

Please sign in to comment.