Test Case was missing test cases for static imports.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5029 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Allan Caplan
2007-02-01 16:50:12 +00:00
parent 42aa947983
commit 181f92ba64

View File

@ -140,4 +140,33 @@ public class Foo {
}
]]></code>
</test-code>
<test-code>
<description><![CDATA[
Used static import
]]></description>
<expected-problems>0</expected-problems>
<code><![CDATA[
import static com.foo.MyClass.staticMethod;
public class Foo {
public Foo(){
staticMethod("This is OK");
}
}
]]></code>
<source-type>java 1.5</source-type>
</test-code>
<test-code>
<description><![CDATA[
Unused static import
]]></description>
<expected-problems>1</expected-problems>
<code><![CDATA[
import static com.foo.MyClass.staticMethod;
public class Foo {
public Foo(){
}
}
]]></code>
<source-type>java 1.5</source-type>
</test-code>
</test-data>