[AA] Add symbol tests for symbols from JS klibs
Use test compiler runner to compile JS libraries. Determine compiler by the specified TARGET_PLATFORM. Add tests for dynamic type and JS-specific .proto extensions. Refactor the code for mock library compilation to make the switch between platforms more straightforward. KTIJ-27566 KT-63217
This commit is contained in:
committed by
Space Team
parent
0736cb3fac
commit
0eb1a63a2f
@@ -0,0 +1,6 @@
|
||||
// DECLARATION_TYPE: org.jetbrains.kotlin.psi.KtClass
|
||||
|
||||
@Y
|
||||
class Cls
|
||||
|
||||
annotation class Y
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
KT element: KtClass
|
||||
KT element text:
|
||||
@Y public final class Cls public constructor() {
|
||||
}
|
||||
FIR element: FirRegularClassImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
@R|Y|() public final [ResolvedTo(BODY_RESOLVE)] class Cls : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Cls] constructor(): R|Cls|
|
||||
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// DECLARATION_TYPE: org.jetbrains.kotlin.psi.KtClass
|
||||
|
||||
class Cls @Y constructor()
|
||||
|
||||
annotation class Y
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
KT element: KtClass
|
||||
KT element text:
|
||||
public final class Cls @Y public constructor() {
|
||||
}
|
||||
FIR element: FirRegularClassImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
public final [ResolvedTo(BODY_RESOLVE)] class Cls : R|kotlin/Any| {
|
||||
@R|Y|() public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Cls] constructor(): R|Cls|
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
// DECLARATION_TYPE: org.jetbrains.kotlin.psi.KtFunction
|
||||
|
||||
public inline fun Any?.asDynamic(): dynamic = this
|
||||
@@ -0,0 +1,8 @@
|
||||
KT element: KtNamedFunction
|
||||
KT element text:
|
||||
public inline fun kotlin.Any?.asDynamic(): dynamic /* platform type */ { /* compiled code */ }
|
||||
FIR element: FirSimpleFunctionImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
public final inline [ResolvedTo(BODY_RESOLVE)] fun R|kotlin/Any?|.asDynamic(): R|dynamic|
|
||||
@@ -0,0 +1,7 @@
|
||||
// DECLARATION_TYPE: org.jetbrains.kotlin.psi.KtClass
|
||||
|
||||
enum class Enum {
|
||||
@Y ENTRY
|
||||
}
|
||||
|
||||
annotation class Y
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
KT element: KtClass
|
||||
KT element text:
|
||||
public final enum class Enum private constructor() : kotlin.Enum<Enum> {
|
||||
@Y ENTRY;
|
||||
}
|
||||
FIR element: FirRegularClassImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
public final [ResolvedTo(BODY_RESOLVE)] enum class Enum : R|kotlin/Enum<Enum>| {
|
||||
public final static [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Enum] fun valueOf([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/String|): R|Enum| {
|
||||
}
|
||||
|
||||
public final static [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Enum] fun values(): R|kotlin/Array<Enum>| {
|
||||
}
|
||||
|
||||
public final static [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Enum] val entries: R|kotlin/enums/EnumEntries<Enum>|
|
||||
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/enums/EnumEntries<Enum>|
|
||||
|
||||
private [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Enum] constructor(): R|Enum|
|
||||
|
||||
public final static [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Enum] enum entry ENTRY: R|Enum|
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// DECLARATION_TYPE: org.jetbrains.kotlin.psi.KtFunction
|
||||
|
||||
@file:JsModule("extModule")
|
||||
package ext.jspackage.name
|
||||
external fun foo()
|
||||
@@ -0,0 +1,8 @@
|
||||
KT element: KtNamedFunction
|
||||
KT element text:
|
||||
public external fun foo(): kotlin.Unit { /* compiled code */ }
|
||||
FIR element: FirSimpleFunctionImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
public final external [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit|
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// DECLARATION_TYPE: org.jetbrains.kotlin.psi.KtFunction
|
||||
|
||||
@Y
|
||||
fun fn() {
|
||||
}
|
||||
|
||||
annotation class Y
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
KT element: KtNamedFunction
|
||||
KT element text:
|
||||
@Y public fun fn(): kotlin.Unit { /* compiled code */ }
|
||||
FIR element: FirSimpleFunctionImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
@R|Y|() public final [ResolvedTo(BODY_RESOLVE)] fun fn(): R|kotlin/Unit|
|
||||
@@ -0,0 +1,7 @@
|
||||
// DECLARATION_TYPE: org.jetbrains.kotlin.psi.KtClass
|
||||
|
||||
@JsModule("jquery")
|
||||
@JsNonModule
|
||||
@JsName("$")
|
||||
external abstract class JQuery() {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
KT element: KtClass
|
||||
KT element text:
|
||||
@kotlin.js.JsModule @kotlin.js.JsNonModule @kotlin.js.JsName public abstract external class JQuery public constructor() {
|
||||
}
|
||||
FIR element: FirRegularClassImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
@R|kotlin/js/JsModule|(import = String(jquery)) @R|kotlin/js/JsNonModule|() @R|kotlin/js/JsName|(name = String($)) public abstract external [ResolvedTo(BODY_RESOLVE)] class JQuery : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=JQuery] constructor(): R|JQuery|
|
||||
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// DECLARATION_TYPE: org.jetbrains.kotlin.psi.KtFunction
|
||||
|
||||
fun fn(@Y p: String) {
|
||||
}
|
||||
|
||||
annotation class Y
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
KT element: KtNamedFunction
|
||||
KT element text:
|
||||
public fun fn(@Y p: kotlin.String): kotlin.Unit { /* compiled code */ }
|
||||
FIR element: FirSimpleFunctionImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
public final [ResolvedTo(BODY_RESOLVE)] fun fn([ResolvedTo(BODY_RESOLVE)] @R|Y|() p: R|kotlin/String|): R|kotlin/Unit|
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// DECLARATION_TYPE: org.jetbrains.kotlin.psi.KtProperty
|
||||
|
||||
@Y
|
||||
var prop: Int = 0
|
||||
@Y get() = field
|
||||
@Y set(value) { field = value }
|
||||
|
||||
annotation class Y
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
KT element: KtProperty
|
||||
KT element text:
|
||||
@Y public var prop: kotlin.Int /* compiled code */
|
||||
public final @Y get
|
||||
public final @Y set(value: kotlin.Int) {/* compiled code */ }
|
||||
FIR element: FirPropertyImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
@R|Y|() public final [ResolvedTo(BODY_RESOLVE)] var prop: R|kotlin/Int|
|
||||
@R|Y|() public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int|
|
||||
@R|Y|() public [ResolvedTo(BODY_RESOLVE)] set([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/Int|): R|kotlin/Unit|
|
||||
@@ -0,0 +1,6 @@
|
||||
// DECLARATION_TYPE: org.jetbrains.kotlin.psi.KtProperty
|
||||
|
||||
val prop: @Y Int = 1
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Y
|
||||
@@ -0,0 +1,8 @@
|
||||
KT element: KtProperty
|
||||
KT element text:
|
||||
public val prop: @Y kotlin.Int = COMPILED_CODE /* compiled code */
|
||||
FIR element: FirPropertyImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
public final [ResolvedTo(BODY_RESOLVE)] val prop: R|@R|Y|() kotlin/Int|
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// DECLARATION_TYPE: org.jetbrains.kotlin.psi.KtClass
|
||||
|
||||
class Cls<@Y T>
|
||||
|
||||
@Target(AnnotationTarget.TYPE_PARAMETER)
|
||||
annotation class Y
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
KT element: KtClass
|
||||
KT element text:
|
||||
public final class Cls<@Y T> public constructor() {
|
||||
}
|
||||
FIR element: FirRegularClassImpl
|
||||
FIR source kind: KtRealSourceElementKind
|
||||
|
||||
FIR element rendered:
|
||||
public final [ResolvedTo(BODY_RESOLVE)] class Cls<@R|Y|() [ResolvedTo(BODY_RESOLVE)] T> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Cls] constructor<@R|Y|() [ResolvedTo(BODY_RESOLVE)] T>(): R|Cls<T>|
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user