OptIn ExperimentalNativeApi

This commit is contained in:
Abduqodiri Qurbonzoda
2023-06-17 11:50:29 +03:00
committed by Space Team
parent aae8a687a4
commit 209c916a7e
94 changed files with 123 additions and 67 deletions
@@ -2,6 +2,8 @@
// "\tat 1 main.kexe\t\t 0x000000010d7cdb4c kfun:package.function(kotlin.Int) + 108 (/path/to/file/name.kt:10:27)\n"
// If test is broken, org.jetbrains.kotlin.idea.filters.KotlinExceptionFilter (in main Kotlin repo) should be updated.
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
import kotlin.test.*
import kotlin.text.Regex
@@ -2,7 +2,7 @@
* Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
@file:OptIn(ExperimentalStdlibApi::class, FreezingIsDeprecated::class)
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, FreezingIsDeprecated::class)
import kotlin.test.*
@@ -2,7 +2,7 @@
* Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
@file:OptIn(ExperimentalStdlibApi::class, FreezingIsDeprecated::class)
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, FreezingIsDeprecated::class)
import kotlin.test.*
@@ -2,7 +2,7 @@
* Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
@file:OptIn(ExperimentalStdlibApi::class, FreezingIsDeprecated::class)
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, FreezingIsDeprecated::class)
import kotlin.test.*
@@ -2,7 +2,7 @@
* Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
@file:OptIn(ExperimentalStdlibApi::class, FreezingIsDeprecated::class)
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, FreezingIsDeprecated::class)
import kotlin.test.*
@@ -2,7 +2,7 @@
* Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
@file:OptIn(ExperimentalStdlibApi::class, FreezingIsDeprecated::class)
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, FreezingIsDeprecated::class)
import kotlin.test.*
@@ -1,3 +1,5 @@
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
import kotlin.text.Regex
import kotlin.test.*
@@ -1,3 +1,5 @@
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
import kotlin.text.Regex
import kotlin.test.*
@@ -44,14 +46,14 @@ internal val regex = Regex("^(\\d+)\\ +.*/(.*):(\\d+):.*$")
internal fun checkFrame(value:String) {
val goldValues = arrayOf<Pair<String, Int>?>(
*arrayOfNulls(expectedExceptionContrFrames),
"kt-37572.kt" to 40,
"kt-37572.kt" to 31,
"kt-37572.kt" to 42,
"kt-37572.kt" to 33,
*(if (expectedInlinesCount != 0) arrayOf(
"kt-37572.kt" to 36,
"kt-37572.kt" to 29,
"kt-37572.kt" to 38,
"kt-37572.kt" to 31,
) else emptyArray()),
"kt-37572.kt" to 19,
"kt-37572.kt" to 7)
"kt-37572.kt" to 21,
"kt-37572.kt" to 9)
val (pos, file, line) = regex.find(value)!!.destructured
goldValues[pos.toInt()]?.let {
@@ -1,3 +1,5 @@
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
import kotlin.text.Regex
import kotlin.test.*
@@ -1,3 +1,5 @@
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
import kotlin.text.Regex
import kotlin.test.*
@@ -34,8 +36,8 @@ internal fun checkFrame(value:String) {
val goldValues = arrayOf<Pair<String, Int>?>(
*arrayOfNulls(expectedExceptionContrFrames),
*arrayOfNulls(expectedInlinesCount),
"stack_trace_inline.kt" to 8,
"stack_trace_inline.kt" to 23)
"stack_trace_inline.kt" to 10,
"stack_trace_inline.kt" to 25)
val (pos, file, line) = regex.find(value)!!.destructured
goldValues[pos.toInt()]?.let {
assertEquals(it.first, file)
@@ -2,7 +2,7 @@
* Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
@file:OptIn(ExperimentalStdlibApi::class)
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
import kotlin.test.*
@@ -1,3 +1,5 @@
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
import kotlin.text.Regex
import kotlin.test.*
@@ -2,7 +2,7 @@
* Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
@file:OptIn(ExperimentalStdlibApi::class)
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
import kotlin.test.*