improve code coverage

This commit is contained in:
Oliver Burn 2002-12-08 04:09:15 +00:00
parent 4a93f55b6c
commit 8a75a5feec
2 changed files with 5 additions and 3 deletions

View File

@ -31,7 +31,6 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes;
public class RightCurlyCheck
extends AbstractOptionCheck
{
/**
* Sets the right curly otion to same.
*/
@ -56,7 +55,7 @@ public class RightCurlyCheck
DetailAST nextToken = null;
if (aAST.getType() == TokenTypes.LITERAL_ELSE) {
nextToken = aAST;
DetailAST thenAST = aAST.getPreviousSibling();
final DetailAST thenAST = aAST.getPreviousSibling();
rcurly = thenAST.getLastChild();
}
else if (aAST.getType() == TokenTypes.LITERAL_CATCH) {

View File

@ -9,6 +9,7 @@ import java.io.InputStreamReader;
import java.io.LineNumberReader;
import java.io.OutputStream;
import java.io.PrintStream;
import java.util.Locale;
import java.util.Properties;
import junit.framework.TestCase;
@ -43,8 +44,10 @@ public abstract class BaseCheckTestCase
protected Checker createChecker(Configuration aCheckConfig)
throws Exception
{
DefaultConfiguration dc = createCheckerConfig(aCheckConfig);
final DefaultConfiguration dc = createCheckerConfig(aCheckConfig);
final Checker c = new Checker();
c.setLocaleCountry(Locale.getDefault().getCountry());
c.setLocaleLanguage(Locale.getDefault().getLanguage());
c.configure(dc);
c.addListener(new BriefLogger(mStream));
return c;