Split one more test

This commit is contained in:
Valentin Kipyatkov
2016-08-28 11:21:08 +03:00
parent 1221b6bb67
commit c864fce035
7 changed files with 32 additions and 18 deletions
@@ -20,15 +20,3 @@ fun g() = A()
fun h() = g()
fun listOfA() = listOf<A>(A(1, "", ""))
fun x(o: Any) {
if (o is A) {
val (x, y) = o
val (x1, y1) = A(1, "", "")
}
}
fun y(o: Any) {
val list = o as List<A>
val (x, y) = list[0]
}
@@ -4,12 +4,10 @@ Searched references to a in Kotlin files
Searched references to f() in Kotlin files
Searched references to g() in Kotlin files
Searched references to h() in Kotlin files
Searched references to list in Kotlin files
Searched references to listOfA() in Kotlin files
Searched references to pack.A
Searched references to parameter a in null in Kotlin files
Used plain search in LocalSearchScope:
CLASS:A
FUN:ext1
FUN:ext1
FUN:x
FUN:ext1
@@ -7,9 +7,6 @@
[dataClass.2.kt] Value read 11 val (x3, y3, z3) = h()
[dataClass.2.kt] Value read 13 val (x4, y4, z4) = listOfA()[0]
[dataClass.2.kt] Value read 15 val (x5, y5, z5) = javaClass.getA()[0]
[dataClass.2.kt] Value read 26 val (x, y) = o
[dataClass.2.kt] Value read 27 val (x1, y1) = A(1, "", "")
[dataClass.2.kt] Value read 33 val (x, y) = list[0]
[dataClass.2.kt] Value read 5 a.n
[dataClass.2.kt] Value read 8 val (x, y, z) = a
[dataClass.2.kt] Value read 9 val (x1, y1, z1) = f()
@@ -0,0 +1,16 @@
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
// OPTIONS: usages
data class A(val <caret>x: Int, val y: Int)
fun x(o: Any) {
if (o is A) {
val (x, y) = o
val (x1, y1) = A(1, "", "")
}
}
fun y(o: Any) {
val list = o as List<A>
val (x, y) = list[0]
}
@@ -0,0 +1,6 @@
Searched inheritors of A
Searched references to A
Searched references to list in Kotlin files
Used plain search in LocalSearchScope:
CLASS:A
FUN:x
@@ -0,0 +1,3 @@
Value read 15 val (x, y) = list[0]
Value read 8 val (x, y) = o
Value read 9 val (x1, y1) = A(1, "", "")
@@ -212,6 +212,12 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest {
doTest(fileName);
}
@TestMetadata("isAndAs.0.kt")
public void testIsAndAs() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/isAndAs.0.kt");
doTest(fileName);
}
@TestMetadata("lambdas.0.kt")
public void testLambdas() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/lambdas.0.kt");