kapt: Add class declarations test in AP wrapper

This commit is contained in:
Yan Zhulanow
2015-06-23 20:27:38 +03:00
parent c6ac878cf0
commit 441e72abed
3 changed files with 14 additions and 3 deletions
@@ -32,6 +32,8 @@ public class AnnotationListParseTest {
Test fun testSimple() = doTest("simple")
Test fun testDeclarations() = doTest("classDeclarations")
private val resourcesRootFile = File("src/test/resources/parse")
@@ -59,10 +61,11 @@ public class AnnotationListParseTest {
}
}
val actualAnnotationsSorted = actualAnnotations.toString()
.lines().filter { it.isNotEmpty() }.sort().joinToString("\n")
val actualAnnotationsSorted = actualAnnotations.toString().lines().filter { it.isNotEmpty() }.sort()
val classDeclarationsSorted = annotationProvider.kotlinClasses.sort()
assertEqualsToFile(expectedFile, actualAnnotationsSorted)
val fileContents = (actualAnnotationsSorted + classDeclarationsSorted).joinToString("\n")
assertEqualsToFile(expectedFile, fileContents)
}
// JetTestUtils.assertEqualsToFile() is not reachable from here
@@ -0,0 +1,5 @@
p example 0
d 0/TestClass
a example.ExampleAnnotation 0
c 0 0/TestClass
d 0/AncestorClass
@@ -0,0 +1,3 @@
example.ExampleAnnotation example.TestClass
example.AncestorClass
example.TestClass