Skip to content

Commit

Permalink
Issue checkstyle#11446: Update DetailAstImplTest to use execute
Browse files Browse the repository at this point in the history
  • Loading branch information
suniti0804 authored and romani committed Dec 24, 2023
1 parent b37bd53 commit a73e4ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1830,7 +1830,6 @@

<!-- all bellow until https://github.com/checkstyle/checkstyle/issues/11446 -->
<exclude>**/AbstractFileSetCheckTest.class</exclude>
<exclude>**/DetailAstImplTest.class</exclude>
<exclude>**/TreeWalkerTest.class</exclude>
<exclude>**/CheckerTest.class</exclude>
<exclude>**/AllBlockCommentsTest.class</exclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@

import com.puppycrawl.tools.checkstyle.api.DetailAST;
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.checks.TodoCommentCheck;
import com.puppycrawl.tools.checkstyle.internal.utils.TestUtil;
import com.puppycrawl.tools.checkstyle.utils.CommonUtil;

Expand Down Expand Up @@ -686,17 +685,16 @@ public void testManyComments() throws Exception {
final File file = new File(temporaryFolder, "InputDetailASTManyComments.java");

try (Writer bw = Files.newBufferedWriter(file.toPath(), StandardCharsets.UTF_8)) {
bw.write("/*\ncom.puppycrawl.tools.checkstyle.checks.TodoCommentCheck\n\n\n\n*/\n");
bw.write("class C {\n");
for (int i = 0; i <= 30000; i++) {
bw.write("// " + i + "\n");
}
bw.write("}\n");
}

final DefaultConfiguration checkConfig = createModuleConfig(TodoCommentCheck.class);

final String[] expected = CommonUtil.EMPTY_STRING_ARRAY;
verify(checkConfig, file.getAbsolutePath(), expected);
verifyWithInlineConfigParser(file.getAbsolutePath(), expected);
}

@Test
Expand Down

0 comments on commit a73e4ca

Please sign in to comment.