Improve test readability

This commit is contained in:
Clément Fournier
2018-05-23 19:41:04 +02:00
parent 9cc8068881
commit 0fa74aacfb
@@ -3,10 +3,9 @@
xmlns="http://pmd.sourceforge.net/rule-tests"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/rule-tests http://pmd.sourceforge.net/rule-tests_1_0_0.xsd">
<test-code>
<description><![CDATA[
param
]]></description>
<description>param</description>
<expected-problems>1</expected-problems>
<code><![CDATA[
public class Foo {
@@ -15,10 +14,9 @@ public class Foo {
}
]]></code>
</test-code>
<test-code>
<description><![CDATA[
none
]]></description>
<description>none</description>
<expected-problems>0</expected-problems>
<code><![CDATA[
public class Foo {
@@ -28,10 +26,9 @@ public class Foo {
}
]]></code>
</test-code>
<test-code>
<description><![CDATA[
local
]]></description>
<description>local</description>
<expected-problems>1</expected-problems>
<code><![CDATA[
public class Foo {
@@ -43,10 +40,9 @@ public class Foo {
}
]]></code>
</test-code>
<test-code>
<description><![CDATA[
for
]]></description>
<description>for</description>
<expected-problems>0</expected-problems>
<code><![CDATA[
public class Foo {
@@ -56,10 +52,9 @@ public class Foo {
}
]]></code>
</test-code>
<test-code>
<description><![CDATA[
field
]]></description>
<description>field</description>
<expected-problems>1</expected-problems>
<code><![CDATA[
public class Foo {
@@ -67,10 +62,9 @@ public class Foo {
}
]]></code>
</test-code>
<test-code>
<description><![CDATA[
catch(Exception e) is OK
]]></description>
<description>catch(Exception e) is OK</description>
<expected-problems>0</expected-problems>
<code><![CDATA[
public class Foo {
@@ -81,6 +75,7 @@ public class Foo {
]]></code>
</test-code>
<test-code>
<description>ShortVariable false positive with for-each loops</description>
<expected-problems>0</expected-problems>
@@ -93,6 +88,7 @@ public class Foo {
}
]]></code>
</test-code>
<test-code>
<description>ShortVariable within for-each loops</description>
<expected-problems>1</expected-problems>
@@ -106,6 +102,7 @@ public class Foo {
}
]]></code>
</test-code>
<test-code>
<description>#1361 ShortVariable configuration - 7 characters</description>
<rule-property name="minimum">7</rule-property>
@@ -120,6 +117,7 @@ public class ShortVariable {
}
]]></code>
</test-code>
<test-code>
<description>#1361 ShortVariable configuration - 1 characters</description>
<rule-property name="minimum">1</rule-property>