[FIR Test] Migrate AbstractFirLoadCompiledKotlin to new test infrastructure
Also introduce two different modes for those tests: - load metadata compiled with K1 - load metadata compiled with K2
This commit is contained in:
committed by
Space Team
parent
63829876b7
commit
6287968511
+19
@@ -0,0 +1,19 @@
|
||||
public final inline fun callsEffectExplicitUnknown(x: R|kotlin/Int|, block: R|() -> kotlin/Unit|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
CallsInPlace(block, UNKNOWN)
|
||||
>
|
||||
|
||||
|
||||
public final inline fun callsEffectImplicitUnknown(x: R|kotlin/Int|, y: R|kotlin/Int|, block: R|() -> kotlin/Unit|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
CallsInPlace(block, UNKNOWN)
|
||||
>
|
||||
|
||||
|
||||
public final fun <X, Y, Z, R> callsEffectWithKind(block: R|(X, Y, Z) -> R|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
CallsInPlace(block, EXACTLY_ONCE)
|
||||
>
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
public final inline fun <reified T, reified U> cast(value: R|kotlin/Any?|, z: R|U|): R|T|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(WILDCARD) -> value is T
|
||||
>
|
||||
|
||||
|
||||
public final inline fun <reified T> requireIsInstance(value: R|kotlin/Any?|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(WILDCARD) -> value is T
|
||||
>
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
public final class Foo : R|kotlin/Any| {
|
||||
public final fun <X, Y, Z, R> callsEffectWithKind(block: R|(X, Y, Z) -> R|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
CallsInPlace(block, EXACTLY_ONCE)
|
||||
>
|
||||
|
||||
|
||||
public final fun returnsImplies(x: R|kotlin/Boolean|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(WILDCARD) -> x
|
||||
>
|
||||
|
||||
|
||||
public constructor(): R|test/Foo|
|
||||
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
public final fun deeplyNested(x: R|kotlin/Any?|, y: R|kotlin/Any?|, b: R|kotlin/Boolean|, s: R|kotlin/String?|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(TRUE) -> x is kotlin/Int && x is kotlin/String || x is kotlin/Int && y is test/A || b || (!b) && s != null && y is test/A || x is kotlin/String
|
||||
>
|
||||
|
||||
|
||||
public final class A : R|kotlin/Any| {
|
||||
public constructor(): R|test/A|
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
public final fun embedInstancePredicate(x: R|kotlin/Any|, y: R|kotlin/Any?|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(WILDCARD) -> x is kotlin/String && y is kotlin/String
|
||||
>
|
||||
|
||||
|
||||
public final fun embedNullCheckPredicate(x: R|kotlin/Any?|, y: R|kotlin/Int?|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(WILDCARD) -> y != null && x is kotlin/String
|
||||
>
|
||||
|
||||
|
||||
public final fun R|kotlin/Boolean|.embedReceiverReference(b: R|kotlin/Boolean|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(WILDCARD) -> (!this) && b
|
||||
>
|
||||
|
||||
|
||||
public final fun embedVariable(x: R|kotlin/Any|, b: R|kotlin/Boolean|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(WILDCARD) -> b && x is kotlin/String
|
||||
>
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
public final inline fun <T> R|T|.also(block: R|(T) -> kotlin/Unit|): R|T|
|
||||
[R|Contract description]
|
||||
<
|
||||
CallsInPlace(block, EXACTLY_ONCE)
|
||||
>
|
||||
|
||||
|
||||
public final inline fun <T> R|T|.apply(block: R|T.() -> kotlin/Unit|): R|T|
|
||||
[R|Contract description]
|
||||
<
|
||||
CallsInPlace(block, EXACTLY_ONCE)
|
||||
>
|
||||
|
||||
|
||||
public final inline fun <T, R> R|T|.let(block: R|(T) -> R|): R|R|
|
||||
[R|Contract description]
|
||||
<
|
||||
CallsInPlace(block, EXACTLY_ONCE)
|
||||
>
|
||||
|
||||
|
||||
public final inline fun repeat(times: R|kotlin/Int|, action: R|(kotlin/Int) -> kotlin/Unit|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
CallsInPlace(action, UNKNOWN)
|
||||
>
|
||||
|
||||
|
||||
public final inline fun <R> run(block: R|() -> R|): R|R|
|
||||
[R|Contract description]
|
||||
<
|
||||
CallsInPlace(block, EXACTLY_ONCE)
|
||||
>
|
||||
|
||||
|
||||
public final inline fun <T, R> R|T|.run(block: R|T.() -> R|): R|R|
|
||||
[R|Contract description]
|
||||
<
|
||||
CallsInPlace(block, EXACTLY_ONCE)
|
||||
>
|
||||
|
||||
|
||||
public final inline fun <T> R|T|.takeIf(predicate: R|(T) -> kotlin/Boolean|): R|T?|
|
||||
[R|Contract description]
|
||||
<
|
||||
CallsInPlace(predicate, EXACTLY_ONCE)
|
||||
>
|
||||
|
||||
|
||||
public final inline fun <T, R> with(receiver: R|T|, block: R|T.() -> R|): R|R|
|
||||
[R|Contract description]
|
||||
<
|
||||
CallsInPlace(block, EXACTLY_ONCE)
|
||||
>
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
public final fun R|kotlin/Any?|.receiverIsInstance(): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(TRUE) -> this is test/A
|
||||
>
|
||||
|
||||
|
||||
public final fun simpleIsInstace(x: R|kotlin/Any?|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(TRUE) -> x is test/A
|
||||
>
|
||||
|
||||
|
||||
public final class A : R|kotlin/Any| {
|
||||
public constructor(): R|test/A|
|
||||
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
public final fun andSequence(x: R|kotlin/Any?|, y: R|kotlin/Any?|, b: R|kotlin/Boolean|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(WILDCARD) -> x is test/A && x is test/B && y is test/A && b
|
||||
>
|
||||
|
||||
|
||||
public final fun orSequence(x: R|kotlin/Any?|, y: R|kotlin/Any?|, b: R|kotlin/Boolean|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(WILDCARD) -> x is kotlin/String || y is kotlin/Int || (!b)
|
||||
>
|
||||
|
||||
|
||||
public final class A : R|kotlin/Any| {
|
||||
public constructor(): R|test/A|
|
||||
|
||||
}
|
||||
|
||||
public final class B : R|kotlin/Any| {
|
||||
public constructor(): R|test/B|
|
||||
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
public final fun returnsAndCalls(b: R|kotlin/Boolean|, block: R|() -> kotlin/Unit|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(FALSE) -> !b
|
||||
CallsInPlace(block, UNKNOWN)
|
||||
Returns(TRUE) -> b
|
||||
>
|
||||
|
||||
|
||||
public final fun returnsAndFinished(b: R|kotlin/Boolean|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(TRUE) -> b
|
||||
Returns(WILDCARD) -> b != null
|
||||
Returns(FALSE) -> !b
|
||||
>
|
||||
|
||||
|
||||
public final fun severalCalls(x: R|() -> kotlin/Unit|, y: R|() -> kotlin/Unit|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
CallsInPlace(x, AT_MOST_ONCE)
|
||||
CallsInPlace(y, AT_LEAST_ONCE)
|
||||
>
|
||||
|
||||
|
||||
public final fun threeReturnsValue(b: R|kotlin/Boolean|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(NOT_NULL) -> b != null
|
||||
Returns(TRUE) -> b
|
||||
Returns(FALSE) -> !b
|
||||
>
|
||||
|
||||
|
||||
public final fun twoReturnsValue(b: R|kotlin/Boolean|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(TRUE) -> b
|
||||
Returns(FALSE) -> !b
|
||||
>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
public final fun bar(x: R|kotlin/Any?|): R|kotlin/Boolean|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(WILDCARD) -> x is kotlin/Int
|
||||
>
|
||||
|
||||
|
||||
public final fun foo(x: R|kotlin/Any?|): R|kotlin/Boolean|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(WILDCARD) -> x is kotlin/String
|
||||
>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public final fun foo(n: R|kotlin/Int|, x: R|kotlin/Any?|): R|kotlin/Boolean|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(TRUE) -> x is kotlin/String
|
||||
>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
public final fun R|kotlin/Any?|.isNotNull(): R|kotlin/Boolean|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(TRUE) -> this != null
|
||||
>
|
||||
Reference in New Issue
Block a user