Renamed and correct test data
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
//IS_APPLICABLE: FALSE
|
// IS_APPLICABLE: false
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
fun b(c: List<String>) {
|
fun b(c: List<String>) {
|
||||||
for ((<caret>indexVariable, d) in c.withIndex()) {
|
for ((<caret>indexVariable, d) in c.withIndex()) {
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
//IS_APPLICABLE: FALSE
|
|
||||||
//ERROR: Unresolved reference: b
|
|
||||||
fun foo() {
|
|
||||||
for (a <caret>in b) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
// IS_APPLICABLE: false
|
||||||
|
// ERROR: Unresolved reference: b
|
||||||
|
fun foo() {
|
||||||
|
for (a <caret>in b) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
//WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
fun foo(bar: IntArray) {
|
fun foo(bar: IntArray) {
|
||||||
for (<caret>a in bar) {
|
for (<caret>a in bar) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
fun foo(bar: IntArray) {
|
fun foo(bar: IntArray) {
|
||||||
for ((index, a) in bar.withIndex()) {
|
for ((index, a) in bar.withIndex()) {
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
//WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
fun foo(bar: Iterable<Int>) {
|
fun foo(bar: Iterable<Int>) {
|
||||||
for (<caret>a in bar) {
|
for (<caret>a in bar) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
fun foo(bar: Iterable<Int>) {
|
fun foo(bar: Iterable<Int>) {
|
||||||
for ((index, a) in bar.withIndex()) {
|
for ((index, a) in bar.withIndex()) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
fun foo(bar: Array<Object>) {
|
fun foo(bar: Array<Object>) {
|
||||||
for (<caret>a in bar) {
|
for (<caret>a in bar) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
fun foo(bar: Array<Object>) {
|
fun foo(bar: Array<Object>) {
|
||||||
for ((index, a) in bar.withIndex()) {
|
for ((index, a) in bar.withIndex()) {
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
//WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
fun foo(bar: String) {
|
fun foo(bar: String) {
|
||||||
for (<caret>a in bar) {
|
for (<caret>a in bar) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
fun foo(bar: String) {
|
fun foo(bar: String) {
|
||||||
for ((index, a) in bar.withIndex()) {
|
for ((index, a) in bar.withIndex()) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//IS_APPLICABLE: FALSE
|
// IS_APPLICABLE: false
|
||||||
fun foo(bar: List<String>) {
|
fun foo(bar: List<String>) {
|
||||||
for (<caret>a in bar) {
|
for (<caret>a in bar) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// IS_APPLICABLE: FALSE
|
// IS_APPLICABLE: FALSE
|
||||||
//WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
fun foo(b: List<Int>) : Int {
|
fun foo(b: List<Int>) : Int {
|
||||||
for ((i, <caret>c) in b.withIndex()) {
|
for ((i, <caret>c) in b.withIndex()) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
fun foo(bar: List<Int>) {
|
fun foo(bar: List<Int>) {
|
||||||
for ((i : <caret>Int, b: Int) in bar.withIndex()) {
|
for ((i : <caret>Int, b: Int) in bar.withIndex()) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
fun foo(bar: List<Int>) {
|
fun foo(bar: List<Int>) {
|
||||||
for (b: Int in bar) {
|
for (b: Int in bar) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
fun foo(bar: List<String>) {
|
fun foo(bar: List<String>) {
|
||||||
for ((i,<caret>a) in bar.withIndex()) {
|
for ((i,<caret>a) in bar.withIndex()) {
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
//WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
fun foo(bar: List<String>) {
|
fun foo(bar: List<String>) {
|
||||||
for (a in bar) {
|
for (a in bar) {
|
||||||
|
|
||||||
|
|||||||
@@ -100,27 +100,33 @@ public class IntentionTestGenerated extends AbstractIntentionTest {
|
|||||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addForLoopIndices"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true);
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addForLoopIndices"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("explicitParamType.kt")
|
||||||
|
public void testExplicitParamType() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/explicitParamType.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("inapplicableExistingIndices.kt")
|
@TestMetadata("inapplicableExistingIndices.kt")
|
||||||
public void testInapplicableExistingIndices() throws Exception {
|
public void testInapplicableExistingIndices() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/inapplicableExistingIndices.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/inapplicableExistingIndices.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inapplicableOnMap.kt")
|
||||||
|
public void testInapplicableOnMap() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/inapplicableOnMap.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("inapplicableOverridenFunction.kt")
|
@TestMetadata("inapplicableOverridenFunction.kt")
|
||||||
public void testInapplicableOverridenFunction() throws Exception {
|
public void testInapplicableOverridenFunction() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/inapplicableOverridenFunction.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/inapplicableOverridenFunction.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("inapplicableSyntaxError.kt")
|
@TestMetadata("inapplicableUnresolved.kt")
|
||||||
public void testInapplicableSyntaxError() throws Exception {
|
public void testInapplicableUnresolved() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/inapplicableSyntaxError.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/inapplicableUnresolved.kt");
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("inapplicableUnorderedCollection.kt")
|
|
||||||
public void testInapplicableUnorderedCollection() throws Exception {
|
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/inapplicableUnorderedCollection.kt");
|
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,12 +142,6 @@ public class IntentionTestGenerated extends AbstractIntentionTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("listWithType.kt")
|
|
||||||
public void testListWithType() throws Exception {
|
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/listWithType.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("objectArray.kt")
|
@TestMetadata("objectArray.kt")
|
||||||
public void testObjectArray() throws Exception {
|
public void testObjectArray() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/objectArray.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/objectArray.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user