(no message)

This commit is contained in:
Eugene Vigdorchik
2005-03-09 14:49:18 +03:00
parent 2a0082d4a0
commit 53b77d26bb
3 changed files with 47 additions and 0 deletions
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems>
<problem>
<file>Test.java</file>
<line>2</line>
<description>Field can be converted to one or more local variables.</description>
</problem>
</problems>
@@ -0,0 +1,13 @@
class Test {
private int f;
void foo () {
f = 0;
int k = f;
}
int bar () {
f = 5;
return f;
}
}
@@ -0,0 +1,26 @@
package com.intellij.codeInspection;
import com.intellij.codeInspection.ex.LocalInspectionToolWrapper;
import com.intellij.codeInspection.varScopeCanBeNarrowed.FieldCanBeLocalInspection;
/**
* @author ven
*/
public class FieldCanBeLocalTest extends InspectionTestCase {
private LocalInspectionTool myTool;
private LocalInspectionToolWrapper myWrapper;
protected void setUp() throws Exception {
super.setUp();
myTool = new FieldCanBeLocalInspection();
myWrapper = new LocalInspectionToolWrapper(myTool);
}
private void doTest() throws Exception {
doTest("fieldCanBeLocal/" + getTestName(false), myWrapper);
}
public void testSimple () throws Exception {
doTest();
}
}