forked from phoedos/pmd
more XML cleanups
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4844 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -21,20 +21,14 @@
|
||||
rule.addProperty("minimum", "10");
|
||||
runTests(tests);
|
||||
}
|
||||
|
||||
public void testReallyLongMethodWithLongerRange() throws Throwable {
|
||||
rule.addProperty("minimum", "20");
|
||||
runTest(new TestDescriptor(tests[1].getCode(),
|
||||
"minimum with longer range", 0, rule));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
public void testOverrideMinimumWithTopScore() throws Throwable {
|
||||
Rule r = findRule("codesize", "ExcessiveMethodLength");
|
||||
r.addProperty("minimum", "1");
|
||||
r.addProperty("topscore", "2");
|
||||
Report rpt = new Report();
|
||||
runTestFromString(tests[4].getCode(), r, rpt);
|
||||
runTestFromString(tests[5].getCode(), r, rpt);
|
||||
for (Iterator i = rpt.iterator(); i.hasNext();) {
|
||||
RuleViolation rv = (RuleViolation)i.next();
|
||||
assertTrue(rv.getLine() == 2 || rv.getLine() == 6);
|
||||
|
@ -13,12 +13,7 @@ public class Foo {
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
<test-code>
|
||||
<description><![CDATA[
|
||||
long
|
||||
]]></description>
|
||||
<expected-problems>1</expected-problems>
|
||||
<code><![CDATA[
|
||||
<code-fragment id="long"><![CDATA[
|
||||
public class Foo {
|
||||
public static void main(String args[]) {
|
||||
bar();
|
||||
@ -34,7 +29,21 @@ public class Foo {
|
||||
bar();
|
||||
} // 11 lines - violation
|
||||
}
|
||||
]]></code>
|
||||
]]></code-fragment>
|
||||
<test-code>
|
||||
<description><![CDATA[
|
||||
long, normal range
|
||||
]]></description>
|
||||
<expected-problems>1</expected-problems>
|
||||
<code-ref id="long"/>
|
||||
</test-code>
|
||||
<test-code>
|
||||
<description><![CDATA[
|
||||
long, minimum with longer range
|
||||
]]></description>
|
||||
<rule-property name="minimum">20</rule-property>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code-ref id="long"/>
|
||||
</test-code>
|
||||
<test-code>
|
||||
<description><![CDATA[
|
||||
|
Reference in New Issue
Block a user