From 8bb244d50b7ef1b8028fa5492009d3ea367b1a19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20K=C3=BChne?= Date: Sun, 1 Dec 2002 09:02:58 +0000 Subject: [PATCH] implement createChecker for real, most tests are running now --- .../tools/checkstyle/BaseCheckTestCase.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/tests/com/puppycrawl/tools/checkstyle/BaseCheckTestCase.java b/src/tests/com/puppycrawl/tools/checkstyle/BaseCheckTestCase.java index 83231f266..c04d28031 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/BaseCheckTestCase.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/BaseCheckTestCase.java @@ -41,16 +41,17 @@ public abstract class BaseCheckTestCase return checkConfig; } - protected Checker createChecker(Configuration aConfig) + protected Checker createChecker(Configuration aCheckConfig) throws Exception { - throw new IllegalStateException("not implemented yet"); -// final DefaultConfiguration dc = new DefaultConfiguration("root"); -// dc.addChild(aConfig); -// final Checker c = new Checker(); -// c.configure(aConfig); -// c.addListener(new BriefLogger(mStream)); -// return c; + final DefaultConfiguration dc = new DefaultConfiguration("root"); + final DefaultConfiguration twConf = createCheckConfig(TreeWalker.class); + dc.addChild(twConf); + twConf.addChild(aCheckConfig); + final Checker c = new Checker(); + c.configure(dc); + c.addListener(new BriefLogger(mStream)); + return c; } protected static String getPath(String aFilename)