forked from phoedos/pmd
[java] Fix rule tests with dysfunctional rule configurations
This commit is contained in:
@@ -120,13 +120,6 @@ public class Foo {
|
||||
<code-ref id="addresses"/>
|
||||
</test-code>
|
||||
|
||||
<test-code>
|
||||
<description>Comprehensive, check for nothing</description>
|
||||
<rule-property name="checkAddressTypes"></rule-property>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code-ref id="addresses"/>
|
||||
</test-code>
|
||||
|
||||
<test-code>
|
||||
<description>Comprehensive, check for IPv4</description>
|
||||
<rule-property name="checkAddressTypes">IPv4</rule-property>
|
||||
|
@@ -25,12 +25,6 @@ public class Foo {
|
||||
}
|
||||
]]></code-fragment>
|
||||
|
||||
<test-code>
|
||||
<description>default package: nothing configured, ok</description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code-ref id="default-package" />
|
||||
</test-code>
|
||||
|
||||
<test-code>
|
||||
<description>default package: unused package, ok</description>
|
||||
<rule-property name="packages">nothing.used</rule-property>
|
||||
@@ -69,12 +63,6 @@ public class Foo {
|
||||
<code-ref id="default-package" />
|
||||
</test-code>
|
||||
|
||||
<test-code>
|
||||
<description>some package: nothing configured, ok</description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code-ref id="some-package" />
|
||||
</test-code>
|
||||
|
||||
<test-code>
|
||||
<description>some package: unused package, ok</description>
|
||||
<rule-property name="packages">nothing.used</rule-property>
|
||||
@@ -115,6 +103,7 @@ public class Foo {
|
||||
|
||||
<test-code>
|
||||
<description>bug fix: annotation before package</description>
|
||||
<rule-property name="packages">javax.xml.ws.wsaddressing</rule-property>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
@javax.xml.bind.annotation.XmlSchema(namespace=W3CEndpointReference.NS, location="http://www.w3.org/2006/03/addressing/ws-addr.xsd")
|
||||
|
@@ -62,10 +62,10 @@ public class Foo {
|
||||
|
||||
<test-code>
|
||||
<description>Test default report level - report 200</description>
|
||||
<rule-property name="reportLevel">0</rule-property>
|
||||
<rule-property name="reportLevel">1</rule-property>
|
||||
<expected-problems>1</expected-problems>
|
||||
<expected-messages>
|
||||
<message>The method 'bar()' has an NPath complexity of 200, current threshold is 0</message>
|
||||
<message>The method 'bar()' has an NPath complexity of 200, current threshold is 1</message>
|
||||
</expected-messages>
|
||||
<code><![CDATA[
|
||||
public class Foo {
|
||||
|
Reference in New Issue
Block a user