-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Plugin sandbox: add test with metadata printed by kotlinp
This is mainly to check that plugin-supplied annotations are serialized correctly to metadata (KT-57919).
- Loading branch information
Showing
6 changed files
with
150 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package test | ||
|
||
import org.jetbrains.kotlin.plugin.sandbox.AddAnnotations | ||
|
||
@AddAnnotations | ||
class Some(val x: Int) { | ||
fun foo() {} | ||
|
||
class Derived | ||
} |
34 changes: 34 additions & 0 deletions
34
plugins/plugin-sandbox/testData/metadata/annotations.metadata.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// test/Some.class | ||
// ------------------------------------------ | ||
@org/jetbrains/kotlin/plugin/sandbox/AddAnnotations | ||
@org/jetbrains/kotlin/plugin/sandbox/AnnotationToAdd(booleanValue = true, byteValue = 1.toByte(), charValue = 'c', doubleValue = 4.2, floatValue = 2.4f, intValue = 42, longValue = 24L, shortValue = 7.toShort(), stringValue = "OK", vararg = [org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = []), org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = [org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 1)]), org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = [org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 2), org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 3)])]) | ||
public final class test/Some : kotlin/Any { | ||
|
||
// signature: <init>(I)V | ||
@org/jetbrains/kotlin/plugin/sandbox/AnnotationToAdd(booleanValue = true, byteValue = 1.toByte(), charValue = 'c', doubleValue = 4.2, floatValue = 2.4f, intValue = 42, longValue = 24L, shortValue = 7.toShort(), stringValue = "OK", vararg = [org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = []), org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = [org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 1)]), org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = [org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 2), org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 3)])]) | ||
public constructor(@org/jetbrains/kotlin/plugin/sandbox/AnnotationToAdd(booleanValue = true, byteValue = 1.toByte(), charValue = 'c', doubleValue = 4.2, floatValue = 2.4f, intValue = 42, longValue = 24L, shortValue = 7.toShort(), stringValue = "OK", vararg = [org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = []), org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = [org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 1)]), org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = [org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 2), org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 3)])]) x: kotlin/Int) | ||
|
||
// signature: foo()V | ||
@org/jetbrains/kotlin/plugin/sandbox/AnnotationToAdd(booleanValue = true, byteValue = 1.toByte(), charValue = 'c', doubleValue = 4.2, floatValue = 2.4f, intValue = 42, longValue = 24L, shortValue = 7.toShort(), stringValue = "OK", vararg = [org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = []), org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = [org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 1)]), org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = [org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 2), org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 3)])]) | ||
public final fun foo(): kotlin/Unit | ||
|
||
// field: x:I | ||
// getter: getX()I | ||
// synthetic method for annotations: getX$annotations()V | ||
@org/jetbrains/kotlin/plugin/sandbox/AnnotationToAdd(booleanValue = true, byteValue = 1.toByte(), charValue = 'c', doubleValue = 4.2, floatValue = 2.4f, intValue = 42, longValue = 24L, shortValue = 7.toShort(), stringValue = "OK", vararg = [org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = []), org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = [org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 1)]), org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = [org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 2), org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 3)])]) | ||
@org/jetbrains/kotlin/plugin/sandbox/AnnotationToAdd(booleanValue = true, byteValue = 1.toByte(), charValue = 'c', doubleValue = 4.2, floatValue = 2.4f, intValue = 42, longValue = 24L, shortValue = 7.toShort(), stringValue = "OK", vararg = [org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = []), org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = [org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 1)]), org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = [org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 2), org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 3)])]) | ||
public final val x: kotlin/Int | ||
@org/jetbrains/kotlin/plugin/sandbox/AnnotationToAdd(booleanValue = true, byteValue = 1.toByte(), charValue = 'c', doubleValue = 4.2, floatValue = 2.4f, intValue = 42, longValue = 24L, shortValue = 7.toShort(), stringValue = "OK", vararg = [org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = []), org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = [org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 1)]), org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = [org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 2), org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 3)])]) | ||
public final /* non-default */ get | ||
|
||
// nested class: Derived | ||
} | ||
// test/Some$Derived.class | ||
// ------------------------------------------ | ||
@org/jetbrains/kotlin/plugin/sandbox/AnnotationToAdd(booleanValue = true, byteValue = 1.toByte(), charValue = 'c', doubleValue = 4.2, floatValue = 2.4f, intValue = 42, longValue = 24L, shortValue = 7.toShort(), stringValue = "OK", vararg = [org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = []), org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = [org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 1)]), org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = [org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 2), org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 3)])]) | ||
public final class test/Some.Derived : kotlin/Any { | ||
|
||
// signature: <init>()V | ||
@org/jetbrains/kotlin/plugin/sandbox/AnnotationToAdd(booleanValue = true, byteValue = 1.toByte(), charValue = 'c', doubleValue = 4.2, floatValue = 2.4f, intValue = 42, longValue = 24L, shortValue = 7.toShort(), stringValue = "OK", vararg = [org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = []), org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = [org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 1)]), org/jetbrains/kotlin/plugin/sandbox/ArrayAnnotation(annotations = [org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 2), org/jetbrains/kotlin/plugin/sandbox/SimpleAnnotation(x = 3)])]) | ||
public constructor() | ||
} |
32 changes: 32 additions & 0 deletions
32
.../tests-gen/org/jetbrains/kotlin/plugin/sandbox/FirMetadataPluginSandboxTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters