make IG test light

This commit is contained in:
Bas Leijdekkers
2014-11-07 12:15:51 +01:00
parent 45982eaa3e
commit 8cced4cec4
3 changed files with 18 additions and 14 deletions
@@ -4,7 +4,7 @@ public class PrimitiveArrayArgumentToVariableArgMethod
{
public static void main(String[] arg)
{
methodVarArgObject(new byte[3]);
methodVarArgObject(<warning descr="Confusing primitive array argument to var-arg method">new byte[3]</warning>);
methodVarArgByteArray(new byte[3]);
}
@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>PrimitiveArrayArgumentToVariableArgMethod.java</file>
<line>7</line>
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Confusing primitive array argument to var-arg method</problem_class>
<description>Confusing primitive array argument to var-arg method #loc</description>
</problem>
</problems>
@@ -1,10 +1,23 @@
package com.siyeh.ig.bugs;
import com.siyeh.ig.IGInspectionTestCase;
import com.intellij.codeInspection.InspectionProfileEntry;
import com.siyeh.ig.LightInspectionTestCase;
import org.jetbrains.annotations.Nullable;
public class PrimitiveArrayArgumentToVariableArgMethodInspectionTest extends IGInspectionTestCase {
public class PrimitiveArrayArgumentToVariableArgMethodInspectionTest extends LightInspectionTestCase {
public void test() throws Exception {
doTest("com/siyeh/igtest/bugs/var_arg", new PrimitiveArrayArgumentToVariableArgMethodInspection());
public void testPrimitiveArrayArgumentToVariableArgMethod() throws Exception {
doTest();
}
@Nullable
@Override
protected InspectionProfileEntry getInspection() {
return new PrimitiveArrayArgumentToVariableArgMethodInspection();
}
@Override
protected String getBasePath() {
return "/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/var_arg";
}
}