From 7cfdd8a512adb6b8589328610efb5bd56c3c0dd7 Mon Sep 17 00:00:00 2001 From: Szymon Świstun Date: Wed, 11 Mar 2020 15:07:56 +0100 Subject: Add annotations to extra properties --- plugins/base/src/test/kotlin/model/ClassesTest.kt | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'plugins/base/src/test') diff --git a/plugins/base/src/test/kotlin/model/ClassesTest.kt b/plugins/base/src/test/kotlin/model/ClassesTest.kt index 2f83d8c0..166a72e3 100644 --- a/plugins/base/src/test/kotlin/model/ClassesTest.kt +++ b/plugins/base/src/test/kotlin/model/ClassesTest.kt @@ -402,9 +402,23 @@ class ClassesTest : AbstractModelTest("/src/main/kotlin/classes/Test.kt", "class } } + @Test fun annotatedClass() { + inlineModelTest( + """@Suppress("abc") class Foo() {}""" + ) { + with((this / "classes" / "Foo").cast()) { + with(extra[Annotations]?.content?.firstOrNull().assertNotNull("annotations")) { + dri.toString() equals "kotlin/Suppress////" + with(params["names"].assertNotNull("param")) { + this equals "[\"abc\"]" + } + } + } + } + } + // TODO annotations -// @Test -// fun annotatedClass() { +// @Test fun annotatedClass() { // verifyPackageMember("testdata/classes/annotatedClass.kt", ModelConfig( // analysisPlatform = analysisPlatform, // withKotlinRuntime = true -- cgit