make IG test light

This commit is contained in:
Bas Leijdekkers
2015-04-07 17:25:49 +02:00
parent 25cc1e0927
commit b942b9d6e8
3 changed files with 14 additions and 22 deletions
@@ -12,7 +12,7 @@ public class ReturnFromFinallyBlock
}
finally
{
return;
<warning descr="'return' inside 'finally' block">return</warning>;
}
}
@@ -24,7 +24,7 @@ public class ReturnFromFinallyBlock
}
finally
{
return 3;
<warning descr="'return' inside 'finally' block">return</warning> 3;
}
}
@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>ReturnFromFinallyBlock.java</file>
<line>15</line>
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">'return' inside 'finally' block</problem_class>
<description>&lt;code&gt;return&lt;/code&gt; inside 'finally' block #loc</description>
</problem>
<problem>
<file>ReturnFromFinallyBlock.java</file>
<line>27</line>
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">'return' inside 'finally' block</problem_class>
<description>&lt;code&gt;return&lt;/code&gt; inside 'finally' block #loc</description>
</problem>
</problems>
@@ -1,10 +1,18 @@
package com.siyeh.ig.errorhandling;
import com.siyeh.ig.IGInspectionTestCase;
import com.intellij.codeInspection.InspectionProfileEntry;
import com.siyeh.ig.LightInspectionTestCase;
import org.jetbrains.annotations.Nullable;
public class ReturnFromFinallyBlockInspectionTest extends IGInspectionTestCase {
public class ReturnFromFinallyBlockInspectionTest extends LightInspectionTestCase {
public void test() throws Exception {
doTest("com/siyeh/igtest/errorhandling/return_from_finally_block", new ReturnFromFinallyBlockInspection());
public void testReturnFromFinallyBlock() throws Exception {
doTest();
}
@Nullable
@Override
protected InspectionProfileEntry getInspection() {
return new ReturnFromFinallyBlockInspection();
}
}