mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
make IG test light
This commit is contained in:
+2
-2
@@ -14,7 +14,7 @@ public class ThrowableInstanceNeverThrown {
|
||||
}
|
||||
|
||||
void bar() {
|
||||
new RuntimeException();
|
||||
<warning descr="Runtime exception instance 'new RuntimeException()' is not thrown">new RuntimeException()</warning>;
|
||||
}
|
||||
|
||||
void throwing() throws Throwable {
|
||||
@@ -31,7 +31,7 @@ public class ThrowableInstanceNeverThrown {
|
||||
}
|
||||
|
||||
void leftBehind() throws Throwable {
|
||||
final RuntimeException e = new RuntimeException("throw me");
|
||||
final RuntimeException e = <warning descr="Runtime exception instance 'new RuntimeException(\"throw me\")' is not thrown">new RuntimeException("throw me")</warning>;
|
||||
}
|
||||
|
||||
void exceptionIsCollected() {
|
||||
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
|
||||
<problem>
|
||||
<file>ThrowableInstanceNeverThrown.java</file>
|
||||
<line>17</line>
|
||||
<problem_class>Throwable instance not thrown</problem_class>
|
||||
<description>Runtime exception instance <code>new RuntimeException()</code> is not thrown</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>ThrowableInstanceNeverThrown.java</file>
|
||||
<line>34</line>
|
||||
<problem_class>Throwable instance not thrown</problem_class>
|
||||
<description>Runtime exception instance <code>new RuntimeException("throw me")</code> is not thrown</description>
|
||||
</problem>
|
||||
|
||||
</problems>
|
||||
+12
-6
@@ -1,12 +1,18 @@
|
||||
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 ThrowableInstanceNeverThrownInspectionTest
|
||||
extends IGInspectionTestCase {
|
||||
public class ThrowableInstanceNeverThrownInspectionTest extends LightInspectionTestCase {
|
||||
|
||||
public void test() throws Exception {
|
||||
doTest("com/siyeh/igtest/bugs/throwable_instance_never_thrown",
|
||||
new ThrowableInstanceNeverThrownInspection());
|
||||
public void testThrowableInstanceNeverThrown() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
protected InspectionProfileEntry getInspection() {
|
||||
return new ThrowableInstanceNeverThrownInspection();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user