kapt: Add class declarations test in AP wrapper
This commit is contained in:
+6
-3
@@ -32,6 +32,8 @@ public class AnnotationListParseTest {
|
|||||||
|
|
||||||
Test fun testSimple() = doTest("simple")
|
Test fun testSimple() = doTest("simple")
|
||||||
|
|
||||||
|
Test fun testDeclarations() = doTest("classDeclarations")
|
||||||
|
|
||||||
|
|
||||||
private val resourcesRootFile = File("src/test/resources/parse")
|
private val resourcesRootFile = File("src/test/resources/parse")
|
||||||
|
|
||||||
@@ -59,10 +61,11 @@ public class AnnotationListParseTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val actualAnnotationsSorted = actualAnnotations.toString()
|
val actualAnnotationsSorted = actualAnnotations.toString().lines().filter { it.isNotEmpty() }.sort()
|
||||||
.lines().filter { it.isNotEmpty() }.sort().joinToString("\n")
|
val classDeclarationsSorted = annotationProvider.kotlinClasses.sort()
|
||||||
|
|
||||||
assertEqualsToFile(expectedFile, actualAnnotationsSorted)
|
val fileContents = (actualAnnotationsSorted + classDeclarationsSorted).joinToString("\n")
|
||||||
|
assertEqualsToFile(expectedFile, fileContents)
|
||||||
}
|
}
|
||||||
|
|
||||||
// JetTestUtils.assertEqualsToFile() is not reachable from here
|
// JetTestUtils.assertEqualsToFile() is not reachable from here
|
||||||
|
|||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
p example 0
|
||||||
|
d 0/TestClass
|
||||||
|
a example.ExampleAnnotation 0
|
||||||
|
c 0 0/TestClass
|
||||||
|
d 0/AncestorClass
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
example.ExampleAnnotation example.TestClass
|
||||||
|
example.AncestorClass
|
||||||
|
example.TestClass
|
||||||
Reference in New Issue
Block a user