2 * Created by IntelliJ IDEA.
6 * To change template for new class use
7 * Code Style | Class Templates options (Tools | IDE Options).
9 package com
.intellij
.codeInspection
;
11 import com
.intellij
.JavaTestUtil
;
12 import com
.intellij
.codeInspection
.dataFlow
.DataFlowInspection
;
13 import com
.intellij
.codeInspection
.ex
.LocalInspectionToolWrapper
;
14 import com
.intellij
.testFramework
.InspectionTestCase
;
15 import org
.jetbrains
.annotations
.NonNls
;
17 public class DataFlowInspectionTest
extends InspectionTestCase
{
19 protected String
getTestDataPath() {
20 return JavaTestUtil
.getJavaTestDataPath() + "/inspection";
23 private void doTest() throws Exception
{
24 doTest("dataFlow/" + getTestName(false), new DataFlowInspection());
27 private void doTest15() throws Exception
{
28 final LocalInspectionToolWrapper tool
= new LocalInspectionToolWrapper(new DataFlowInspection());
29 doTest("dataFlow/" + getTestName(false), tool
, "java 1.5");
32 public void testnpe1() throws Exception
{ doTest(); }
34 public void testcaseAndNpe() throws Exception
{ doTest(); }
36 public void testcce() throws Exception
{ doTest(); }
38 public void testexceptionCFG() throws Exception
{ doTest(); }
40 public void testinst() throws Exception
{ doTest(); }
42 public void testwrongEqualTypes() throws Exception
{ doTest(); }
44 public void testSCR13702() throws Exception
{ doTest(); }
46 public void testSCR13626() throws Exception
{ doTest(); }
48 public void testSCR13871() throws Exception
{ doTest(); }
50 public void testInstanceof() throws Exception
{ doTest(); }
52 public void testorBug() throws Exception
{ doTest(); }
54 public void testSCR14819() throws Exception
{ doTest(); }
56 public void testSCR14314() throws Exception
{ doTest(); }
58 public void testSCR15162() throws Exception
{ doTest(); }
60 public void testCatchParameterCantBeNull() throws Exception
{ doTest(); }
62 public void testxor() throws Exception
{ doTest(); }
64 public void testGenericInstanceof() throws Exception
{ doTest(); }
66 public void testthisInstanceof() throws Exception
{ doTest(); }
68 public void testandEq() throws Exception
{ doTest(); }
70 public void testnullableField() throws Exception
{ doTest(); }
72 public void testSCR39950() throws Exception
{ doTest(); }
74 public void testscrIDEA1() throws Exception
{ doTest(); }
75 public void testSCR18186() throws Exception
{ doTest(); }
76 //public void testSCR15406() throws Exception {
79 public void testconstantExpr() throws Exception
{ doTest(); }
81 public void testNotNullable() throws Exception
{ doTest15(); }
83 public void testNotNullableParameter() throws Exception
{ doTest15(); }
85 public void testNotNullableParameter2() throws Exception
{ doTest15(); }
87 public void testNullable() throws Exception
{ doTest15(); }
88 public void testNullableThroughCast() throws Exception
{ doTest15(); }
89 public void testNullableThroughVariable() throws Exception
{ doTest15(); }
90 public void testNullableThroughVariableShouldNotBeReported() throws Exception
{ doTest15(); }
91 public void testNullableAssignment() throws Exception
{ doTest15(); }
93 public void testNullableLocalVariable() throws Exception
{ doTest15(); }
95 public void testNotNullLocalVariable() throws Exception
{ doTest15(); }
97 public void testNullableReturn() throws Exception
{ doTest15(); }
99 public void testNullableReturn1() throws Exception
{ doTest15(); }
101 public void testfinalFields() throws Exception
{ doTest15(); }
103 public void testNotNullArray() throws Exception
{ doTest15(); }
105 public void testFieldsFlashing() throws Exception
{ doTest15(); }
107 public void testConditionFalseAndNPE() throws Exception
{ doTest15(); }
109 public void testIDEADEV1575() throws Exception
{ doTest15(); }
111 public void testAlexBug() throws Exception
{ doTest15(); }
112 public void testYoleBug() throws Exception
{ doTest15(); }
114 public void testForeachFlow() throws Exception
{ doTest15(); }
115 public void testForEachNPE() throws Exception
{ doTest15(); }
116 public void testArrayAccessNPE() throws Exception
{ doTest15(); }
117 public void testArrayAccessDoesntCancelAnalysis() throws Exception
{ doTest15(); }
118 public void testcompileTimeConst() throws Exception
{ doTest15(); }
119 public void testautoboxing() throws Exception
{ doTest15(); }
120 public void testunboxingNPE() throws Exception
{ doTest15(); }
122 public void testStrangeArrayIndexOutOfBounds() throws Exception
{ doTest15(); }
123 public void testIDEADEV2605() throws Exception
{ doTest15(); }
124 public void testConstantsDifferentTypes() throws Exception
{ doTest15(); }
125 public void testBoxingNaN() throws Exception
{ doTest15(); }
126 public void testjspTemplateStatement() throws Exception
{
127 @NonNls final String testDir
= getTestDataPath() + "/"+ "dataFlow/" + getTestName(false);
128 runTool(testDir
, "java 1.4", new LocalInspectionToolWrapper(new DataFlowInspection()));
131 public void testboxingBoolean() throws Exception
{ doTest15();}
133 public void testCheckedExceptionDominance() throws Exception
{ doTest15();}
134 public void testIDEADEV10489() throws Exception
{ doTest15();}
135 public void testPlusOnStrings() throws Exception
{ doTest15();}
137 public void testSwitchQualifierProducesNPE() throws Exception
{doTest15();}
138 public void testIDEADEV15583() throws Exception
{doTest15();}
139 public void testIDEADEV13153() throws Exception
{ doTest15(); }
140 public void testIDEADEV13156() throws Exception
{ doTest15(); }
142 //public void testIDEADEV11033() throws Exception { doTest15(); }