[java] Fix rule tests with dysfunctional rule configurations

This commit is contained in:
Andreas Dangel
2022-09-30 10:21:25 +02:00
parent 1cc0fbb047
commit 4fc12f031c
3 changed files with 3 additions and 21 deletions

View File

@@ -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>

View File

@@ -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")

View File

@@ -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 {