From 97286137f1e7155a300236a3b79fc43cedb66ea1 Mon Sep 17 00:00:00 2001 From: Oliver Burn Date: Sun, 1 Dec 2002 05:07:31 +0000 Subject: [PATCH] Up to the letter S. The baby is having a good sleep. --- .../tools/checkstyle/ParameterNameCheckTest.java | 16 ++++++++-------- .../checkstyle/ParameterNumberCheckTest.java | 10 +++++----- .../tools/checkstyle/ParenPadCheckTest.java | 10 +++++----- .../checkstyle/PublicMemberNameCheckTest.java | 4 ++-- .../checkstyle/RedundantImportCheckTest.java | 4 ++-- .../tools/checkstyle/RedundantModifierTest.java | 4 ++-- .../tools/checkstyle/RightCurlyCheckTest.java | 16 ++++++++-------- .../SimplifyBooleanExpressionCheckTest.java | 4 ++-- 8 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/tests/com/puppycrawl/tools/checkstyle/ParameterNameCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/ParameterNameCheckTest.java index 079f52c8b..2f0cf4014 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/ParameterNameCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/ParameterNameCheckTest.java @@ -8,9 +8,9 @@ public class ParameterNameCheckTest public void testCatch() throws Exception { - final CheckConfiguration checkConfig = new CheckConfiguration(); - checkConfig.setClassname(ParameterNameCheck.class.getName()); - checkConfig.addProperty("format", "^NO_WAY_MATEY$"); + final DefaultConfiguration checkConfig = + createCheckConfig(ParameterNameCheck.class); + checkConfig.addAttribute("format", "^NO_WAY_MATEY$"); final Checker c = createChecker(checkConfig); final String fname = getPath("InputLeftCurlyOther.java"); final String[] expected = { @@ -21,9 +21,9 @@ public class ParameterNameCheckTest public void testSpecified() throws Exception { - final CheckConfiguration checkConfig = new CheckConfiguration(); - checkConfig.setClassname(ParameterNameCheck.class.getName()); - checkConfig.addProperty("format", "^a[A-Z][a-zA-Z0-9]*$"); + final DefaultConfiguration checkConfig = + createCheckConfig(ParameterNameCheck.class); + checkConfig.addAttribute("format", "^a[A-Z][a-zA-Z0-9]*$"); final Checker c = createChecker(checkConfig); final String fname = getPath("InputSimple.java"); final String[] expected = { @@ -37,8 +37,8 @@ public class ParameterNameCheckTest public void testDefault() throws Exception { - final CheckConfiguration checkConfig = new CheckConfiguration(); - checkConfig.setClassname(ParameterNameCheck.class.getName()); + final DefaultConfiguration checkConfig = + createCheckConfig(ParameterNameCheck.class); final Checker c = createChecker(checkConfig); final String fname = getPath("InputSimple.java"); final String[] expected = { diff --git a/src/tests/com/puppycrawl/tools/checkstyle/ParameterNumberCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/ParameterNumberCheckTest.java index a93cf13b6..2bf17ce23 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/ParameterNumberCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/ParameterNumberCheckTest.java @@ -8,8 +8,8 @@ public class ParameterNumberCheckTest public void testDefault() throws Exception { - final CheckConfiguration checkConfig = new CheckConfiguration(); - checkConfig.setClassname(ParameterNumberCheck.class.getName()); + final DefaultConfiguration checkConfig = + createCheckConfig(ParameterNumberCheck.class); final Checker c = createChecker(checkConfig); final String fname = getPath("InputSimple.java"); final String[] expected = { @@ -21,9 +21,9 @@ public class ParameterNumberCheckTest public void testNum() throws Exception { - final CheckConfiguration checkConfig = new CheckConfiguration(); - checkConfig.setClassname(ParameterNumberCheck.class.getName()); - checkConfig.addProperty("max", "2"); + final DefaultConfiguration checkConfig = + createCheckConfig(ParameterNumberCheck.class); + checkConfig.addAttribute("max", "2"); final Checker c = createChecker(checkConfig); final String fname = getPath("InputSimple.java"); final String[] expected = { diff --git a/src/tests/com/puppycrawl/tools/checkstyle/ParenPadCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/ParenPadCheckTest.java index ae13e97ae..37d0c635b 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/ParenPadCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/ParenPadCheckTest.java @@ -9,8 +9,8 @@ public class ParenPadCheckTest public void testDefault() throws Exception { - final CheckConfiguration checkConfig = new CheckConfiguration(); - checkConfig.setClassname(ParenPadCheck.class.getName()); + final DefaultConfiguration checkConfig = + createCheckConfig(ParenPadCheck.class); final Checker c = createChecker(checkConfig); final String fname = getPath("InputWhitespace.java"); final String[] expected = { @@ -25,9 +25,9 @@ public class ParenPadCheckTest public void testSpace() throws Exception { - final CheckConfiguration checkConfig = new CheckConfiguration(); - checkConfig.setClassname(ParenPadCheck.class.getName()); - checkConfig.addProperty("option", PadOption.SPACE.toString()); + final DefaultConfiguration checkConfig = + createCheckConfig(ParenPadCheck.class); + checkConfig.addAttribute("option", PadOption.SPACE.toString()); final Checker c = createChecker(checkConfig); final String fname = getPath("InputWhitespace.java"); final String[] expected = { diff --git a/src/tests/com/puppycrawl/tools/checkstyle/PublicMemberNameCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/PublicMemberNameCheckTest.java index da6d9b267..beb5d7db5 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/PublicMemberNameCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/PublicMemberNameCheckTest.java @@ -8,8 +8,8 @@ public class PublicMemberNameCheckTest public void testDefault() throws Exception { - final CheckConfiguration checkConfig = new CheckConfiguration(); - checkConfig.setClassname(PublicMemberNameCheck.class.getName()); + final DefaultConfiguration checkConfig = + createCheckConfig(PublicMemberNameCheck.class); final Checker c = createChecker(checkConfig); final String fname = getPath("InputSimple.java"); final String[] expected = { diff --git a/src/tests/com/puppycrawl/tools/checkstyle/RedundantImportCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/RedundantImportCheckTest.java index 99156e0cd..dbf17a306 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/RedundantImportCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/RedundantImportCheckTest.java @@ -8,8 +8,8 @@ public class RedundantImportCheckTest public void testWithChecker() throws Exception { - final CheckConfiguration checkConfig = new CheckConfiguration(); - checkConfig.setClassname(RedundantImportCheck.class.getName()); + final DefaultConfiguration checkConfig = + createCheckConfig(RedundantImportCheck.class); final Checker c = createChecker(checkConfig); final String fname = getPath("InputImport.java"); final String[] expected = { diff --git a/src/tests/com/puppycrawl/tools/checkstyle/RedundantModifierTest.java b/src/tests/com/puppycrawl/tools/checkstyle/RedundantModifierTest.java index 420e9f213..f3bdd680f 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/RedundantModifierTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/RedundantModifierTest.java @@ -8,8 +8,8 @@ public class RedundantModifierTest public void testIt() throws Exception { - final CheckConfiguration checkConfig = new CheckConfiguration(); - checkConfig.setClassname(RedundantModifierCheck.class.getName()); + final DefaultConfiguration checkConfig = + createCheckConfig(RedundantModifierCheck.class); final Checker c = createChecker(checkConfig); final String fname = getPath("InputModifier.java"); final String[] expected = { diff --git a/src/tests/com/puppycrawl/tools/checkstyle/RightCurlyCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/RightCurlyCheckTest.java index b21ff77df..2d2fd210a 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/RightCurlyCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/RightCurlyCheckTest.java @@ -9,8 +9,8 @@ public class RightCurlyCheckTest public void testDefault() throws Exception { - final CheckConfiguration checkConfig = new CheckConfiguration(); - checkConfig.setClassname(RightCurlyCheck.class.getName()); + final DefaultConfiguration checkConfig = + createCheckConfig(RightCurlyCheck.class); final Checker c = createChecker(checkConfig); final String fname = getPath("InputLeftCurlyOther.java"); final String[] expected = { @@ -25,9 +25,9 @@ public class RightCurlyCheckTest public void testSame() throws Exception { - final CheckConfiguration checkConfig = new CheckConfiguration(); - checkConfig.setClassname(RightCurlyCheck.class.getName()); - checkConfig.addProperty("option", RightCurlyOption.SAME.toString()); + final DefaultConfiguration checkConfig = + createCheckConfig(RightCurlyCheck.class); + checkConfig.addAttribute("option", RightCurlyOption.SAME.toString()); final Checker c = createChecker(checkConfig); final String fname = getPath("InputLeftCurlyOther.java"); final String[] expected = { @@ -42,9 +42,9 @@ public class RightCurlyCheckTest public void testAlone() throws Exception { - final CheckConfiguration checkConfig = new CheckConfiguration(); - checkConfig.setClassname(RightCurlyCheck.class.getName()); - checkConfig.addProperty("option", RightCurlyOption.ALONE.toString()); + final DefaultConfiguration checkConfig = + createCheckConfig(RightCurlyCheck.class); + checkConfig.addAttribute("option", RightCurlyOption.ALONE.toString()); final Checker c = createChecker(checkConfig); final String fname = getPath("InputLeftCurlyOther.java"); final String[] expected = { diff --git a/src/tests/com/puppycrawl/tools/checkstyle/SimplifyBooleanExpressionCheckTest.java b/src/tests/com/puppycrawl/tools/checkstyle/SimplifyBooleanExpressionCheckTest.java index a13eb5b82..44afbed3a 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/SimplifyBooleanExpressionCheckTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/SimplifyBooleanExpressionCheckTest.java @@ -8,8 +8,8 @@ public class SimplifyBooleanExpressionCheckTest public void testIt() throws Exception { - final CheckConfiguration checkConfig = new CheckConfiguration(); - checkConfig.setClassname(SimplifyBooleanExpressionCheck.class.getName()); + final DefaultConfiguration checkConfig = + createCheckConfig(SimplifyBooleanExpressionCheck.class); final Checker c = createChecker(checkConfig); final String fname = getPath("InputSimplifyBoolean.java"); final String[] expected = {