FIR: Unignore all blackbox tests on context receivers

This commit is contained in:
Denis.Zharkov
2022-03-17 13:28:35 +03:00
committed by teamcity
parent 41bc842b9d
commit 2a6700e5d5
30 changed files with 22 additions and 84 deletions
+1 -3
View File
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
class EntityContext {
var d = DoubleArray(16)
@@ -21,4 +19,4 @@ fun box(): String {
eDouble.value = .2
return if (eDouble.value == .2) "OK" else "fail"
}
}
}
+1 -3
View File
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
class A {
val ok = "OK"
@@ -14,4 +12,4 @@ class B {
fun box() = with(A()) {
B().result()
}
}
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
data class MyContainer(var i: Int)
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
data class MyContainer(var s: String)
@@ -22,4 +20,4 @@ fun box(): String {
myContainer[0] = "OK"
myContainer[0] ?: "fail"
}
}
}
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
data class Result(var i: Int)
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
fun withContext(f: context(String) () -> String) = f("OK")
@@ -1,8 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
// KT-51271
class Context {
@@ -36,4 +33,4 @@ fun box(): String = with(Context()) {
result += 1.testInlineWithExtensionAndMultipleContextsAndArgs()
}
return if (result == 23) "OK" else "fail"
}
}
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
// WITH_STDLIB
import kotlin.reflect.KProperty
@@ -34,4 +32,4 @@ fun box(): String {
result.s = "OK"
val returnValue = result.s
return if (operationScore == 2) returnValue else "fail"
}
}
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
interface Canvas {
val suffix: String
@@ -21,4 +19,4 @@ object MyCanvas : Canvas {
override val suffix = ""
}
fun box() = with(MyCanvas) { Circle().draw() }
fun box() = with(MyCanvas) { Circle().draw() }
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
data class Pair<A, B>(val first: A, val second: B)
@@ -18,4 +16,4 @@ fun box(): String {
return with(comparator) {
Pair("OK", "fail").min
}
}
}
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
// WITH_STDLIB
fun List<Int>.decimateEveryEvenThird() = sequence {
@@ -16,4 +14,4 @@ fun List<Int>.decimateEveryEvenThird() = sequence {
fun box() = with(listOf(0, 1, 2).decimateEveryEvenThird()) {
if (toList() == listOf(2)) "OK" else "fail"
}
}
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
// WITH_STDLIB
class View {
@@ -17,4 +15,4 @@ fun box(): String {
}
return "fail"
}
}
}
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
class Param
class O {
@@ -16,4 +14,4 @@ fun <T> K.f(g: context(O) K.(Param) -> T) = g(this@O, this@K, Param())
fun box() = with(O()) {
K().f { o + k }
}
}
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
// WITH_STDLIB
interface Semigroup<T> {
@@ -30,4 +28,4 @@ fun box(): String {
return with(StringMonoid) {
listOf("O", "K").sum()
}
}
}
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
// WITH_STDLIB
// WITH_COROUTINES
@@ -39,4 +37,4 @@ fun box(): String {
return with(MyCoroutineScope) {
simpleFlow().launchFlow()
}
}
}
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
class Result<T>(val x: T)
@@ -18,4 +16,4 @@ fun box(): String {
with(Result<String>("OK")) {
return x()
}
}
}
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
// WITH_STDLIB
data class Counter(var i: Int = 0)
@@ -26,4 +24,4 @@ fun box(): String {
}
}
return if (result == 45) "OK" else "fail"
}
}
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
context(String, Int)
fun overloaded(value: Any?) = "OK"
@@ -13,4 +11,4 @@ fun box() = with("42") {
with(42) {
overloaded(null)
}
}
}
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
context(Int, String)
fun foo(): String = "O"
@@ -19,4 +17,4 @@ fun box(): String {
foo()
}
return o + k
}
}
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
class C {
val result = "OK"
@@ -9,4 +7,4 @@ class C {
fun contextual(f: context(C) () -> String) = f(C())
fun box(): String = contextual { result }
fun box(): String = contextual { result }
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
// WITH_STDLIB
@file:Suppress("RESERVED_VAR_PROPERTY_OF_VALUE_CLASS")
@@ -71,4 +69,4 @@ fun box(): String = with(EntityContext()) {
v1.z = 4.0
v1 += v0
if (v1.x == 3.0 && v1.y == 2.0 && v1.z == 7.0) "OK" else "fail"
}
}
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
// WITH_STDLIB
interface NumberOperations {
@@ -50,4 +48,4 @@ fun box(): String {
with(DoubleOperations) {
return if (m1 + m2 == matrixOf(2, 2, 1.4, 2.3, 3.2, 4.1)) "OK" else "fail"
}
}
}
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
class LoggingCounter {
var operationCounter = 0
@@ -31,4 +29,4 @@ fun box(): String {
}
val operationsTotal = loggingCounter.operationCounter
return if (operationsTotal == 5) "OK" else "$operationsTotal"
}
}
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
class A {
val o = "O"
@@ -20,4 +18,4 @@ fun B.g(a: A): String {
fun box(): String {
return B().g(A())
}
}
@@ -1,9 +1,7 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// WITH_COROUTINES
// WITH_STDLIB
// FIR status: context receivers aren't yet supported
import helpers.*
import kotlin.coroutines.*
@@ -36,4 +34,4 @@ fun box(): String {
}
return result
}
}
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
class A<T>(val a: T)
class B(val b: Any?)
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
data class Result(val i: Int)
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
// MODULE: lib
// FILE: A.kt
@@ -1,7 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
// WITH_STDLIB
// WITH_COROUTINES
@@ -1,8 +1,5 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: context receivers aren't yet supported
// MODULE: lib
// FILE: A.kt