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:
-4
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
|
||||
</problems>
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
</problems>
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
</problems>
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
</problems>
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
|
||||
</problems>
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
</problems>
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
<problem>
|
||||
<file>ElseElse.java</file>
|
||||
<line>26</line>
|
||||
<description>Cast <code>(B)o</code> conflicts with surrounding 'instanceof' check #loc</description>
|
||||
</problem>
|
||||
</problems>
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
public interface I {}
|
||||
interface I {}
|
||||
class A implements I {}
|
||||
class B implements I {}
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
public interface I {}
|
||||
interface I {}
|
||||
class A implements I {}
|
||||
class B implements I {}
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
public interface I {}
|
||||
interface I {}
|
||||
class A implements I {}
|
||||
class B implements I {}
|
||||
|
||||
@@ -6,7 +6,7 @@ class U {
|
||||
void foo(Object o) {
|
||||
boolean b = false;
|
||||
if (o instanceof I) {
|
||||
b = o instanceof A && bar((A)a) && !bazz((A)a)
|
||||
b = o instanceof A && bar((A)o) && !bazz((A)o);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
public interface I {}
|
||||
interface I {}
|
||||
class A implements I {}
|
||||
class B implements I {}
|
||||
|
||||
@@ -23,7 +23,7 @@ class U {
|
||||
|
||||
} else {
|
||||
if (o instanceof A) {
|
||||
B bb = (B)o;
|
||||
B bb = <warning descr="Cast '(B)o' conflicts with surrounding 'instanceof' check">(B)o</warning>;
|
||||
} else {
|
||||
}
|
||||
}
|
||||
+16
-12
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -15,39 +15,43 @@
|
||||
*/
|
||||
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 CastConflictsWithInstanceofInspectionTest extends IGInspectionTestCase {
|
||||
public class CastConflictsWithInstanceofInspectionTest extends LightInspectionTestCase {
|
||||
|
||||
public void testElseElse() throws Exception {
|
||||
public void testElseElse() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testSimple() throws Exception {
|
||||
public void testSimple() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testElseElseOrOr() throws Exception {
|
||||
public void testElseElseOrOr() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testAndAnd() throws Exception {
|
||||
public void testAndAnd() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testPolyadic() throws Exception {
|
||||
public void testPolyadic() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testNotOr() throws Exception {
|
||||
public void testNotOr() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testOrInstanceofOrInstanceof() throws Exception {
|
||||
public void testOrInstanceofOrInstanceof() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest() throws Exception {
|
||||
doTest("com/siyeh/igtest/bugs/castConflictingInstanceof/" + getTestName(true), new CastConflictsWithInstanceofInspection());
|
||||
@Nullable
|
||||
@Override
|
||||
protected InspectionProfileEntry getInspection() {
|
||||
return new CastConflictsWithInstanceofInspection();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user