Enabled more unit tests for regression.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7347 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Andreas Dangel
2011-09-25 16:42:39 +00:00
parent 27e8668ba0
commit 95fcf1260b
8 changed files with 8 additions and 23 deletions

View File

@ -18,9 +18,6 @@ public class PMDTaskTest extends BuildFileTest {
@Test @Test
public void testNoFormattersValidation() { public void testNoFormattersValidation() {
if (TestDescriptor.inRegressionTestMode()) {
return;
}
executeTarget("testNoFormattersValidation"); executeTarget("testNoFormattersValidation");
assertOutputContaining("Fields should be declared at the top of the class"); assertOutputContaining("Fields should be declared at the top of the class");
} }

View File

@ -15,8 +15,6 @@ import net.sourceforge.pmd.PMD;
import org.junit.Test; import org.junit.Test;
import test.net.sourceforge.pmd.testframework.TestDescriptor;
public class PMDCoverageTest { public class PMDCoverageTest {
/** /**
@ -66,10 +64,6 @@ public class PMDCoverageTest {
*/ */
@Test @Test
public void testResourceFileCommands() { public void testResourceFileCommands() {
if (TestDescriptor.inRegressionTestMode()) {
// skip this test if we're only running regression tests
return;
}
InputStream is = getClass().getResourceAsStream(PMD_CONFIG_FILE); InputStream is = getClass().getResourceAsStream(PMD_CONFIG_FILE);

View File

@ -147,7 +147,7 @@ public class Foo {
} }
]]></code> ]]></code>
</test-code> </test-code>
<test-code regressionTest="false"> <test-code>
<description><![CDATA[ <description><![CDATA[
New use case New use case
]]></description> ]]></description>

View File

@ -128,7 +128,7 @@ public class Foo {
} }
]]></code> ]]></code>
</test-code> </test-code>
<test-code regressionTest="false"> <test-code>
<description><![CDATA[ <description><![CDATA[
Bug 2614040 : false + if a += assignment operator is used inside a method call. Bug 2614040 : false + if a += assignment operator is used inside a method call.
]]></description> ]]></description>

View File

@ -1147,7 +1147,7 @@ public class Foo {
} }
]]></code> ]]></code>
</test-code> </test-code>
<test-code regressionTest="false"> <test-code>
<description><![CDATA[ <description><![CDATA[
42, Using variable string array 42, Using variable string array
]]></description> ]]></description>

View File

@ -80,7 +80,7 @@ if(o1!=null && o2.equals(o1.getName()) ){ }
} }
]]></code> ]]></code>
</test-code> </test-code>
<test-code regressionTest="false"> <test-code>
<description><![CDATA[ <description><![CDATA[
shouldn't this fail? Yes, it should. Fixed it, so that method calls to equals on variables are considered, too. shouldn't this fail? Yes, it should. Fixed it, so that method calls to equals on variables are considered, too.
]]></description> ]]></description>
@ -93,7 +93,7 @@ public class Foo {
} }
]]></code> ]]></code>
</test-code> </test-code>
<test-code regressionTest="false"> <test-code>
<description><![CDATA[ <description><![CDATA[
Arrays can't be compared directly but with Arrays.equals(). Arrays can't be compared directly but with Arrays.equals().
]]></description> ]]></description>

View File

@ -43,7 +43,7 @@ public class Foo {
} }
]]></code> ]]></code>
</test-code> </test-code>
<test-code regressionTest="false"> <test-code>
<description><![CDATA[ <description><![CDATA[
failure case, condition 2 failure case, condition 2
]]></description> ]]></description>
@ -122,7 +122,7 @@ public class Foo {
} }
]]></code> ]]></code>
</test-code> </test-code>
<test-code regressionTest="false"> <test-code>
<description><![CDATA[ <description><![CDATA[
false negatives false negatives
]]></description> ]]></description>
@ -151,7 +151,7 @@ public class Foo {
} }
]]></code> ]]></code>
</test-code> </test-code>
<test-code regressionTest="false"> <test-code>
<description><![CDATA[ <description><![CDATA[
Parentheses around binary expressions are really necessary Parentheses around binary expressions are really necessary
]]></description> ]]></description>

View File

@ -33,7 +33,6 @@ import net.sourceforge.pmd.lang.java.typeresolution.ClassTypeResolver;
import org.jaxen.JaxenException; import org.jaxen.JaxenException;
import org.junit.Test; 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.AnonymousInnerClass;
import test.net.sourceforge.pmd.typeresolution.testdata.ArrayListFound; import test.net.sourceforge.pmd.typeresolution.testdata.ArrayListFound;
import test.net.sourceforge.pmd.typeresolution.testdata.ExtraTopLevelClass; import test.net.sourceforge.pmd.typeresolution.testdata.ExtraTopLevelClass;
@ -103,11 +102,6 @@ public class ClassTypeResolverTest {
@Test @Test
public void testAnonymousInnerClass() throws ClassNotFoundException { public void testAnonymousInnerClass() throws ClassNotFoundException {
if (TestDescriptor.inRegressionTestMode()) {
// skip this test if we're only running regression tests
return;
}
ASTCompilationUnit acu = parseAndTypeResolveForClass(AnonymousInnerClass.class); ASTCompilationUnit acu = parseAndTypeResolveForClass(AnonymousInnerClass.class);
Class<?> theAnonymousInnerClass = Class.forName("test.net.sourceforge.pmd.typeresolution.testdata.AnonymousInnerClass$1"); Class<?> theAnonymousInnerClass = Class.forName("test.net.sourceforge.pmd.typeresolution.testdata.AnonymousInnerClass$1");
// Outer class // Outer class