From 95fcf1260b41333008c951bafb40f581f53c7a8b Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sun, 25 Sep 2011 16:42:39 +0000 Subject: [PATCH] Enabled more unit tests for regression. git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7347 51baf565-9d33-0410-a72c-fc3788e3496d --- pmd/regress/test/net/sourceforge/pmd/ant/PMDTaskTest.java | 3 --- .../test/net/sourceforge/pmd/coverage/PMDCoverageTest.java | 6 ------ .../pmd/lang/java/rule/design/xml/CloseResource.xml | 2 +- .../rule/optimizations/xml/LocalVariableCouldBeFinal.xml | 2 +- .../java/rule/strings/xml/ConsecutiveLiteralAppends.xml | 2 +- .../java/rule/unnecessary/xml/UnusedNullCheckInEquals.xml | 4 ++-- .../lang/java/rule/unnecessary/xml/UselessParentheses.xml | 6 +++--- .../pmd/typeresolution/ClassTypeResolverTest.java | 6 ------ 8 files changed, 8 insertions(+), 23 deletions(-) diff --git a/pmd/regress/test/net/sourceforge/pmd/ant/PMDTaskTest.java b/pmd/regress/test/net/sourceforge/pmd/ant/PMDTaskTest.java index d4fa63915a..2a8e5983c1 100644 --- a/pmd/regress/test/net/sourceforge/pmd/ant/PMDTaskTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/ant/PMDTaskTest.java @@ -18,9 +18,6 @@ public class PMDTaskTest extends BuildFileTest { @Test public void testNoFormattersValidation() { - if (TestDescriptor.inRegressionTestMode()) { - return; - } executeTarget("testNoFormattersValidation"); assertOutputContaining("Fields should be declared at the top of the class"); } diff --git a/pmd/regress/test/net/sourceforge/pmd/coverage/PMDCoverageTest.java b/pmd/regress/test/net/sourceforge/pmd/coverage/PMDCoverageTest.java index 9474ae9e17..d0134dfd85 100644 --- a/pmd/regress/test/net/sourceforge/pmd/coverage/PMDCoverageTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/coverage/PMDCoverageTest.java @@ -15,8 +15,6 @@ import net.sourceforge.pmd.PMD; import org.junit.Test; -import test.net.sourceforge.pmd.testframework.TestDescriptor; - public class PMDCoverageTest { /** @@ -66,10 +64,6 @@ public class PMDCoverageTest { */ @Test public void testResourceFileCommands() { - if (TestDescriptor.inRegressionTestMode()) { - // skip this test if we're only running regression tests - return; - } InputStream is = getClass().getResourceAsStream(PMD_CONFIG_FILE); diff --git a/pmd/regress/test/net/sourceforge/pmd/lang/java/rule/design/xml/CloseResource.xml b/pmd/regress/test/net/sourceforge/pmd/lang/java/rule/design/xml/CloseResource.xml index 2b98c7291c..46aba2fc8a 100644 --- a/pmd/regress/test/net/sourceforge/pmd/lang/java/rule/design/xml/CloseResource.xml +++ b/pmd/regress/test/net/sourceforge/pmd/lang/java/rule/design/xml/CloseResource.xml @@ -147,7 +147,7 @@ public class Foo { } ]]> - + diff --git a/pmd/regress/test/net/sourceforge/pmd/lang/java/rule/optimizations/xml/LocalVariableCouldBeFinal.xml b/pmd/regress/test/net/sourceforge/pmd/lang/java/rule/optimizations/xml/LocalVariableCouldBeFinal.xml index 86ff90ae3b..8241bde619 100644 --- a/pmd/regress/test/net/sourceforge/pmd/lang/java/rule/optimizations/xml/LocalVariableCouldBeFinal.xml +++ b/pmd/regress/test/net/sourceforge/pmd/lang/java/rule/optimizations/xml/LocalVariableCouldBeFinal.xml @@ -128,7 +128,7 @@ public class Foo { } ]]> - + diff --git a/pmd/regress/test/net/sourceforge/pmd/lang/java/rule/strings/xml/ConsecutiveLiteralAppends.xml b/pmd/regress/test/net/sourceforge/pmd/lang/java/rule/strings/xml/ConsecutiveLiteralAppends.xml index ea7452453e..41180f3e55 100644 --- a/pmd/regress/test/net/sourceforge/pmd/lang/java/rule/strings/xml/ConsecutiveLiteralAppends.xml +++ b/pmd/regress/test/net/sourceforge/pmd/lang/java/rule/strings/xml/ConsecutiveLiteralAppends.xml @@ -1147,7 +1147,7 @@ public class Foo { } ]]> - + diff --git a/pmd/regress/test/net/sourceforge/pmd/lang/java/rule/unnecessary/xml/UnusedNullCheckInEquals.xml b/pmd/regress/test/net/sourceforge/pmd/lang/java/rule/unnecessary/xml/UnusedNullCheckInEquals.xml index 5f818e46ee..a9979964cb 100644 --- a/pmd/regress/test/net/sourceforge/pmd/lang/java/rule/unnecessary/xml/UnusedNullCheckInEquals.xml +++ b/pmd/regress/test/net/sourceforge/pmd/lang/java/rule/unnecessary/xml/UnusedNullCheckInEquals.xml @@ -80,7 +80,7 @@ if(o1!=null && o2.equals(o1.getName()) ){ } } ]]> - + @@ -93,7 +93,7 @@ public class Foo { } ]]> - + diff --git a/pmd/regress/test/net/sourceforge/pmd/lang/java/rule/unnecessary/xml/UselessParentheses.xml b/pmd/regress/test/net/sourceforge/pmd/lang/java/rule/unnecessary/xml/UselessParentheses.xml index 164bdbc9d4..35a3a75220 100644 --- a/pmd/regress/test/net/sourceforge/pmd/lang/java/rule/unnecessary/xml/UselessParentheses.xml +++ b/pmd/regress/test/net/sourceforge/pmd/lang/java/rule/unnecessary/xml/UselessParentheses.xml @@ -43,7 +43,7 @@ public class Foo { } ]]> - + @@ -122,7 +122,7 @@ public class Foo { } ]]> - + @@ -151,7 +151,7 @@ public class Foo { } ]]> - + diff --git a/pmd/regress/test/net/sourceforge/pmd/typeresolution/ClassTypeResolverTest.java b/pmd/regress/test/net/sourceforge/pmd/typeresolution/ClassTypeResolverTest.java index 0063dfb210..60ddc61c57 100644 --- a/pmd/regress/test/net/sourceforge/pmd/typeresolution/ClassTypeResolverTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/typeresolution/ClassTypeResolverTest.java @@ -33,7 +33,6 @@ import net.sourceforge.pmd.lang.java.typeresolution.ClassTypeResolver; import org.jaxen.JaxenException; import org.junit.Test; -import test.net.sourceforge.pmd.testframework.TestDescriptor; import test.net.sourceforge.pmd.typeresolution.testdata.AnonymousInnerClass; import test.net.sourceforge.pmd.typeresolution.testdata.ArrayListFound; import test.net.sourceforge.pmd.typeresolution.testdata.ExtraTopLevelClass; @@ -103,11 +102,6 @@ public class ClassTypeResolverTest { @Test public void testAnonymousInnerClass() throws ClassNotFoundException { - if (TestDescriptor.inRegressionTestMode()) { - // skip this test if we're only running regression tests - return; - } - ASTCompilationUnit acu = parseAndTypeResolveForClass(AnonymousInnerClass.class); Class theAnonymousInnerClass = Class.forName("test.net.sourceforge.pmd.typeresolution.testdata.AnonymousInnerClass$1"); // Outer class