Added test for "Specify type explicitly" for loop parameters.
#KT-1890 fixed
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
// "Specify Type Explicitly" "true"
|
||||||
|
import java.util.HashMap
|
||||||
|
import java.util.Map
|
||||||
|
|
||||||
|
fun foo(map : HashMap<String, Int>) {
|
||||||
|
for (<caret>entry : Map.Entry<String, Int> in map.entrySet()) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// "Specify Type Explicitly" "true"
|
||||||
|
import java.util.HashMap
|
||||||
|
|
||||||
|
fun foo(map : HashMap<String, Int>) {
|
||||||
|
for (<caret>entry in map.entrySet()) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -49,6 +49,10 @@ public class SpecifyTypeExplicitlyTest extends LightIntentionActionTestCase {
|
|||||||
doTest();
|
doTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testLoopParameter() {
|
||||||
|
doTest();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getTestDataPath() {
|
protected String getTestDataPath() {
|
||||||
return PluginTestCaseBase.getTestDataPathBase() + "/intentions/";
|
return PluginTestCaseBase.getTestDataPathBase() + "/intentions/";
|
||||||
|
|||||||
Reference in New Issue
Block a user