From dfd870600d5b0ef27d08cd1dea56392276f28c59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20K=C3=BChne?= Date: Sun, 8 Sep 2002 12:30:56 +0000 Subject: [PATCH] added test for package name fixed TODO check (got lost during recent refactoring) --- src/tests/com/puppycrawl/tools/checkstyle/CheckerTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tests/com/puppycrawl/tools/checkstyle/CheckerTest.java b/src/tests/com/puppycrawl/tools/checkstyle/CheckerTest.java index 0a0126027..199d2c26b 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/CheckerTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/CheckerTest.java @@ -465,6 +465,8 @@ public class CheckerTest mProps.setProperty(Defn.IGNORE_LINE_LENGTH_PATTERN_PROP, "^.*is OK.*regexp.*$"); mProps.setProperty(Defn.TODO_PATTERN_PROP, "FIXME:"); + mProps.setProperty(Defn.MEMBER_PATTERN_PROP, "^m[A-Z][a-zA-Z0-9]*$"); + mProps.setProperty(Defn.PACKAGE_PATTERN_PROP, "[A-Z]+"); mProps.setProperty(Defn.LOCAL_FINAL_VAR_PATTERN_PROP, "[A-Z]+"); final Checker c = createChecker(); final String filepath = getPath("InputSimple.java"); @@ -472,6 +474,7 @@ public class CheckerTest final String[] expected = { filepath + ":1: File length is 198 lines (max allowed is 20).", filepath + ":3: Line does not match expected header line of '// Created: 2001'.", + filepath + ":6:10: Name 'com.puppycrawl.tools.checkstyle' must match pattern '[A-Z]+'.", filepath + ":18: Line is longer than 80 characters.", filepath + ":19:25: Line contains a tab character.", filepath + ":25:29: Name 'badConstant' must match pattern '^[A-Z](_?[A-Z0-9]+)*$'.",