Split test

This commit is contained in:
Valentin Kipyatkov
2016-08-28 01:30:45 +03:00
parent 2ca163a375
commit 0d9656d638
9 changed files with 29 additions and 12 deletions

View File

@@ -0,0 +1,9 @@
import pack.A;
class JavaClass {
public void takeSAM(JavaSAM sam){}
}
public interface JavaSAM {
void takeA(A a);
}

View File

@@ -0,0 +1,5 @@
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtParameter
// OPTIONS: usages
package pack
data class A(val <caret>a: Int, val b: String)

View File

@@ -0,0 +1,7 @@
Searched inheritors of pack.A
Searched references to JavaClass.takeSAM() in Kotlin files
Searched references to JavaSAM in java files
Searched references to pack.A
Used plain search in LocalSearchScope:
CLASS:A
{ val (x, y) = it }

View File

@@ -0,0 +1 @@
Value read 4 javaClass.takeSAM { val (x, y) = it }

View File

@@ -1,4 +1,3 @@
import kotlin.Unit;
import pack.A;
import java.util.Collections;
@@ -11,10 +10,4 @@ class JavaClass {
}
public void takeA(A a){}
public void takeSAM(JavaSAM sam){}
}
public interface JavaSAM {
void takeA(A a);
}

View File

@@ -2,8 +2,6 @@ Searched inheritors of pack.A
Searched inheritors of pack.B
Searched inheritors of pack.C
Searched references to JavaClass.getA() in Kotlin files
Searched references to JavaClass.takeSAM() in Kotlin files
Searched references to JavaSAM in java files
Searched references to a in Kotlin files
Searched references to a in Kotlin files
Searched references to a1 in Kotlin files
@@ -44,7 +42,6 @@ Used plain search in LocalSearchScope:
{ val (x, y) = it }
{ val (x, y) = it }
{ val (x, y) = it }
{ val (x, y) = it }
{ val (x, y) = it[0] }
{ val (x, y) = this }
Used plain search in LocalSearchScope:

View File

@@ -23,5 +23,4 @@
[dataClass.4.kt] Value read 27 takeFun2 { a, n -> val (x, y) = a!! }
[dataClass.4.kt] Value read 28 takeFun3 { val (x, y) = it[0] }
[dataClass.4.kt] Value read 30 x(p) { val (x, y) = it }
[dataClass.5.kt] Value read 10 "".v = { val (x, y ) = it }
[dataClass.6.kt] Value read 4 javaClass.takeSAM { val (x, y) = it }
[dataClass.5.kt] Value read 10 "".v = { val (x, y ) = it }

View File

@@ -211,6 +211,12 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/memberComponentFun.0.kt");
doTest(fileName);
}
@TestMetadata("SAM.0.kt")
public void testSAM() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/SAM.0.kt");
doTest(fileName);
}
}
}