[Tests] Add .knm stub consistency test

The test compares stub trees built from .knm files directly and from
the decompiled text. Test data for .class decompiler is reused,
JVM-specific cases are ignored

KT-61354
This commit is contained in:
Pavel Kirpichenkov
2023-08-25 18:20:56 +03:00
committed by Space Team
parent 2537ff94b7
commit cf98fb5612
16 changed files with 841 additions and 5 deletions
@@ -1,3 +1,6 @@
// KNM_K2_IGNORE
// KNM_FE10_IGNORE
package test
public class AnnotatedFlexibleTypes(val javaClass: d.JavaClass) {
@@ -1,3 +1,7 @@
// Issue: KTIJ-26788 (need stdlib for lazy)
// KNM_K2_IGNORE
// KNM_FE10_IGNORE
@a public class Annotations private @a constructor(private @property:a @param:a val c1: Int, @property:a @param:a val c2: Int) {
@a() val hasValueArguments = 42
@@ -1,3 +1,5 @@
// Issue: KTIJ-26761
// KNM_K2_IGNORE
public class AnnotationsOnNullableTypes {
fun B<@A C?>.receiverArgument() {}
@@ -1,7 +1,7 @@
// FIR_IDENTICAL
// JVM_FILE_NAME: ContextReceiversOnFunctionTypeKt
// !LANGUAGE: +ContextReceivers
// KNM_K2_IGNORE
fun f(g: context(A, B) Int.(Int) -> Int) {}
class A {
@@ -1,4 +1,7 @@
// FIR_IDENTICAL
// KNM_K2_IGNORE
// KNM_FE10_IGNORE
package test
class LocalClass {
@@ -1,3 +1,7 @@
// Issue: KTIJ-26788 (need stdlib for Continuation)
// KNM_K2_IGNORE
// KNM_FE10_IGNORE
package test
import kotlin.coroutines.*
@@ -1,3 +1,6 @@
// Issue: KTIJ-26761
// KNM_K2_IGNORE
package foo.TopLevelMembers
fun funWithBlockBody() {