Skip to content

Commit

Permalink
Issue checkstyle#11446: Updated CheckerTest to use InlineConfigParser
Browse files Browse the repository at this point in the history
  • Loading branch information
MANISH-K-07 committed Mar 6, 2024
1 parent 8d5daa5 commit 5a8502b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/test/java/com/puppycrawl/tools/checkstyle/CheckerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1015,21 +1015,11 @@ public void testCacheAndCheckWhichAddsNewResourceLocationButKeepsSameCheckerInst

@Test
public void testClearLazyLoadCacheInDetailAST() throws Exception {
final DefaultConfiguration checkConfig1 =
createModuleConfig(CheckWhichDoesNotRequireCommentNodes.class);
final DefaultConfiguration checkConfig2 =
createModuleConfig(CheckWhichRequiresCommentNodes.class);

final DefaultConfiguration treeWalkerConfig = createModuleConfig(TreeWalker.class);
treeWalkerConfig.addChild(checkConfig1);
treeWalkerConfig.addChild(checkConfig2);

final DefaultConfiguration checkerConfig = createRootConfig(treeWalkerConfig);

final String filePath = getPath("InputCheckerClearDetailAstLazyLoadCache.java");
final String[] expected = CommonUtil.EMPTY_STRING_ARRAY;

verify(checkerConfig, filePath, expected);
final String[] expected = CommonUtil.EMPTY_STRING_ARRAY;
verifyWithInlineConfigParser(filePath, expected);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
com.puppycrawl.tools.checkstyle.CheckerTest$CheckWhichDoesNotRequireCommentNodes
com.puppycrawl.tools.checkstyle.CheckerTest$CheckWhichRequiresCommentNodes
*/

package com.puppycrawl.tools.checkstyle.checker;

public class InputCheckerClearDetailAstLazyLoadCache {
Expand Down

0 comments on commit 5a8502b

Please sign in to comment.