forked from phoedos/pmd
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:
@ -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>
|
Reference in New Issue
Block a user