OptIn ExperimentalNativeApi
This commit is contained in:
committed by
Space Team
parent
aae8a687a4
commit
209c916a7e
@@ -5,6 +5,8 @@
|
|||||||
// ASSERTIONS_MODE: always-enable
|
// ASSERTIONS_MODE: always-enable
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
|
@file:Suppress("OPT_IN_USAGE_ERROR") // ExperimentalNativeApi is defined only in Native
|
||||||
|
|
||||||
fun checkTrue(): Boolean {
|
fun checkTrue(): Boolean {
|
||||||
var hit = false
|
var hit = false
|
||||||
val l = { hit = true; true }
|
val l = { hit = true; true }
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
|
|
||||||
|
@Suppress("OPT_IN_USAGE_ERROR") // ExperimentalNativeApi is defined only in Native
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
kotlin.assert(true)
|
kotlin.assert(true)
|
||||||
return "OK"
|
return "OK"
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import kotlin.concurrent.*
|
|||||||
var y = -1
|
var y = -1
|
||||||
|
|
||||||
fun box() : String {
|
fun box() : String {
|
||||||
|
@OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
if (Platform.memoryModel != MemoryModel.EXPERIMENTAL) {
|
if (Platform.memoryModel != MemoryModel.EXPERIMENTAL) {
|
||||||
// The test doesn't make sense for legacy mm, you can't have anything non-atomic to protect with @Volatile var
|
// The test doesn't make sense for legacy mm, you can't have anything non-atomic to protect with @Volatile var
|
||||||
return "OK"
|
return "OK"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2018 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(FreezingIsDeprecated::class)
|
@file:OptIn(FreezingIsDeprecated::class, kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
package codegen.enum.isFrozen
|
package codegen.enum.isFrozen
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(kotlin.ExperimentalStdlibApi::class)
|
@file:OptIn(kotlin.ExperimentalStdlibApi::class, kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
package codegen.initializers.static
|
package codegen.initializers.static
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
import kotlin.native.Platform
|
import kotlin.native.Platform
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ fun <T: Any> dsl(block: DslMain.() -> T): T = DslMain().block()
|
|||||||
|
|
||||||
class TestClass
|
class TestClass
|
||||||
|
|
||||||
|
@OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
class App(testQualified: Boolean) {
|
class App(testQualified: Boolean) {
|
||||||
|
|
||||||
var type = dsl {
|
var type = dsl {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* that can be found in the LICENSE file.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@file:OptIn(FreezingIsDeprecated::class)
|
@file:OptIn(FreezingIsDeprecated::class, kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
package codegen.objectDeclaration.isFrozen
|
package codegen.objectDeclaration.isFrozen
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2018 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
package datagen.rtti.vtable_any
|
package datagen.rtti.vtable_any
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlin.native.Platform
|
import kotlin.native.Platform
|
||||||
|
|
||||||
// The following 2 singletons are unused. However, since we are generating ObjC bindings for them,
|
// The following 2 singletons are unused. However, since we are generating ObjC bindings for them,
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
fun inner1() : Nothing {
|
fun inner1() : Nothing {
|
||||||
throw Exception()
|
throw Exception()
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ func testStackTrace() throws {
|
|||||||
let trace = StacktraceKt.getStackTrace()
|
let trace = StacktraceKt.getStackTrace()
|
||||||
try assertTrue(trace[0].contains("Throwable.kt"))
|
try assertTrue(trace[0].contains("Throwable.kt"))
|
||||||
try assertTrue(trace[1].contains("Exceptions.kt"))
|
try assertTrue(trace[1].contains("Exceptions.kt"))
|
||||||
try assertTrue(trace[2].contains("stacktrace.kt:7"))
|
try assertTrue(trace[2].contains("stacktrace.kt:8"))
|
||||||
try assertTrue(trace[3].contains("stacktrace.kt:12"))
|
try assertTrue(trace[3].contains("stacktrace.kt:13"))
|
||||||
try assertTrue(trace[4].contains("<compiler-generated>"))
|
try assertTrue(trace[4].contains("<compiler-generated>"))
|
||||||
try assertTrue(trace[5].contains("stacktrace.swift:5"))
|
try assertTrue(trace[5].contains("stacktrace.swift:5"))
|
||||||
try assertTrue(trace[6].contains("main.swift"))
|
try assertTrue(trace[6].contains("main.swift"))
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
fun thrower() : Nothing {
|
fun thrower() : Nothing {
|
||||||
throw Exception()
|
throw Exception()
|
||||||
|
|||||||
+1
@@ -2,6 +2,7 @@
|
|||||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
inline fun inner2() : Nothing {
|
inline fun inner2() : Nothing {
|
||||||
throw Exception()
|
throw Exception()
|
||||||
|
|||||||
+3
-3
@@ -3,10 +3,10 @@ import StacktraceByLibbacktrace
|
|||||||
|
|
||||||
func testStackTrace() throws {
|
func testStackTrace() throws {
|
||||||
let trace = StacktraceByLibbacktraceKt.getStackTrace()
|
let trace = StacktraceByLibbacktraceKt.getStackTrace()
|
||||||
try assertTrue(trace[0].contains("stacktraceByLibbacktrace.kt:7"))
|
try assertTrue(trace[0].contains("stacktraceByLibbacktrace.kt:8"))
|
||||||
try assertTrue(trace[0].contains("[inlined]"))
|
try assertTrue(trace[0].contains("[inlined]"))
|
||||||
try assertTrue(trace[1].contains("stacktraceByLibbacktrace.kt:11"))
|
try assertTrue(trace[1].contains("stacktraceByLibbacktrace.kt:12"))
|
||||||
try assertTrue(trace[2].contains("stacktraceByLibbacktrace.kt:16"))
|
try assertTrue(trace[2].contains("stacktraceByLibbacktrace.kt:17"))
|
||||||
try assertTrue(trace[3].contains("<compiler-generated>"))
|
try assertTrue(trace[3].contains("<compiler-generated>"))
|
||||||
try assertTrue(trace[4].contains("stacktraceByLibbacktrace.swift:5"))
|
try assertTrue(trace[4].contains("stacktraceByLibbacktrace.swift:5"))
|
||||||
try assertTrue(trace[5].contains("main.swift:126"))
|
try assertTrue(trace[5].contains("main.swift:126"))
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class)
|
@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class, kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlin.native.*
|
import kotlin.native.*
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2023 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class)
|
@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class, kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlinx.cinterop.*
|
import kotlinx.cinterop.*
|
||||||
import cglobals.*
|
import cglobals.*
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2023 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, kotlinx.cinterop.ExperimentalForeignApi::class)
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
import cmacros.*
|
import cmacros.*
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, kotlinx.cinterop.ExperimentalForeignApi::class)
|
||||||
|
|
||||||
import cunion.*
|
import cunion.*
|
||||||
import kotlinx.cinterop.*
|
import kotlinx.cinterop.*
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class)
|
@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class, kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlinx.cinterop.*
|
import kotlinx.cinterop.*
|
||||||
import kotlin.native.*
|
import kotlin.native.*
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
package knlibrary
|
package knlibrary
|
||||||
|
|
||||||
import kotlin.native.Platform
|
import kotlin.native.Platform
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
// This test is similar to kt42397, just everything is doubled: in "package knlibrary" and the root package
|
// This test is similar to kt42397, just everything is doubled: in "package knlibrary" and the root package
|
||||||
|
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
package knlibrary
|
package knlibrary
|
||||||
|
|
||||||
import kotlin.native.Platform
|
import kotlin.native.Platform
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// This test is similar to kt42397, just everything is in root package instead of "package knlibrary"
|
// This test is similar to kt42397, just everything is in root package instead of "package knlibrary"
|
||||||
|
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlin.native.Platform
|
import kotlin.native.Platform
|
||||||
|
|
||||||
// The following 2 singletons are unused. However, since we are generating C bindings for them,
|
// The following 2 singletons are unused. However, since we are generating C bindings for them,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// This test is similar to kt42397, just everything is doubled: in "package knlibrary.subpackage" and the root package
|
// This test is similar to kt42397, just everything is doubled: in "package knlibrary.subpackage" and the root package
|
||||||
|
|
||||||
// FILE: FirstLevelPackage.kt
|
// FILE: FirstLevelPackage.kt
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
package knlibrary
|
package knlibrary
|
||||||
|
|
||||||
import kotlin.native.Platform
|
import kotlin.native.Platform
|
||||||
@@ -19,6 +20,8 @@ fun enableMemoryChecker() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FILE: rootPackage.kt
|
// FILE: rootPackage.kt
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
object A {}
|
object A {}
|
||||||
|
|
||||||
class B {
|
class B {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// This test is similar to kt42397, just everything is doubled: in "package knlibrary.subpackage" and the root package
|
// This test is similar to kt42397, just everything is doubled: in "package knlibrary.subpackage" and the root package
|
||||||
|
|
||||||
// FILE: SecondLevelPackage.kt
|
// FILE: SecondLevelPackage.kt
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
package knlibrary.subpackage
|
package knlibrary.subpackage
|
||||||
|
|
||||||
import kotlin.native.Platform
|
import kotlin.native.Platform
|
||||||
@@ -19,6 +20,8 @@ fun enableMemoryChecker() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FILE: rootPackage.kt
|
// FILE: rootPackage.kt
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
object A {}
|
object A {}
|
||||||
|
|
||||||
class B {
|
class B {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
// This test is similar to kt42397, just everything is in "package knlibrary.subpackage" instead of "package knlibrary"
|
// This test is similar to kt42397, just everything is in "package knlibrary.subpackage" instead of "package knlibrary"
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
package knlibrary.subpackage
|
package knlibrary.subpackage
|
||||||
|
|
||||||
import kotlin.native.Platform
|
import kotlin.native.Platform
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@file:OptIn(kotlin.native.runtime.NativeRuntimeApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, kotlin.native.runtime.NativeRuntimeApi::class)
|
||||||
|
|
||||||
import leakMemory.*
|
import leakMemory.*
|
||||||
import kotlin.native.concurrent.*
|
import kotlin.native.concurrent.*
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@file:OptIn(kotlin.native.runtime.NativeRuntimeApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, kotlin.native.runtime.NativeRuntimeApi::class)
|
||||||
|
|
||||||
import leakMemory.*
|
import leakMemory.*
|
||||||
import kotlin.native.concurrent.*
|
import kotlin.native.concurrent.*
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@file:OptIn(kotlin.native.runtime.NativeRuntimeApi::class, ObsoleteWorkersApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, kotlin.native.runtime.NativeRuntimeApi::class, ObsoleteWorkersApi::class)
|
||||||
|
|
||||||
import objclib.*
|
import objclib.*
|
||||||
import kotlin.native.concurrent.*
|
import kotlin.native.concurrent.*
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import objclib.*
|
import objclib.*
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2018 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(kotlin.native.runtime.NativeRuntimeApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, kotlin.native.runtime.NativeRuntimeApi::class)
|
||||||
|
|
||||||
import kotlinx.cinterop.*
|
import kotlinx.cinterop.*
|
||||||
import objcSmoke.*
|
import objcSmoke.*
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2018 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(kotlin.native.runtime.NativeRuntimeApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, kotlin.native.runtime.NativeRuntimeApi::class)
|
||||||
|
|
||||||
import kotlinx.cinterop.*
|
import kotlinx.cinterop.*
|
||||||
import objcSmoke.*
|
import objcSmoke.*
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, kotlin.native.runtime.NativeRuntimeApi::class)
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
import kotlin.native.ref.WeakReference
|
import kotlin.native.ref.WeakReference
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@file:OptIn(kotlin.native.runtime.NativeRuntimeApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, kotlin.native.runtime.NativeRuntimeApi::class)
|
||||||
|
|
||||||
import kotlin.native.ref.WeakReference
|
import kotlin.native.ref.WeakReference
|
||||||
import kotlinx.cinterop.*
|
import kotlinx.cinterop.*
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlin.system.exitProcess
|
import kotlin.system.exitProcess
|
||||||
import kotlinx.cinterop.autoreleasepool
|
import kotlinx.cinterop.autoreleasepool
|
||||||
import kotlin.native.internal.test.testLauncherEntryPoint
|
import kotlin.native.internal.test.testLauncherEntryPoint
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@file:OptIn(FreezingIsDeprecated::class, ObsoleteWorkersApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, FreezingIsDeprecated::class, ObsoleteWorkersApi::class)
|
||||||
|
|
||||||
import kotlinx.cinterop.*
|
import kotlinx.cinterop.*
|
||||||
import kotlin.native.concurrent.*
|
import kotlin.native.concurrent.*
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@file:OptIn(kotlin.native.runtime.NativeRuntimeApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, kotlin.native.runtime.NativeRuntimeApi::class)
|
||||||
|
|
||||||
import kotlin.native.ref.*
|
import kotlin.native.ref.*
|
||||||
import kotlinx.cinterop.*
|
import kotlinx.cinterop.*
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import objc_misc.*
|
import objc_misc.*
|
||||||
import kotlin.native.Platform
|
import kotlin.native.Platform
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(FreezingIsDeprecated::class, ExperimentalStdlibApi::class, kotlin.native.runtime.NativeRuntimeApi::class)
|
@file:OptIn(FreezingIsDeprecated::class, kotlin.experimental.ExperimentalNativeApi::class, kotlin.native.runtime.NativeRuntimeApi::class)
|
||||||
|
|
||||||
import kotlin.native.concurrent.*
|
import kotlin.native.concurrent.*
|
||||||
import kotlin.native.runtime.Debugging
|
import kotlin.native.runtime.Debugging
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(FreezingIsDeprecated::class, ExperimentalStdlibApi::class, kotlin.native.runtime.NativeRuntimeApi::class)
|
@file:OptIn(FreezingIsDeprecated::class, kotlin.experimental.ExperimentalNativeApi::class, kotlin.native.runtime.NativeRuntimeApi::class)
|
||||||
|
|
||||||
import kotlin.native.concurrent.*
|
import kotlin.native.concurrent.*
|
||||||
import kotlin.native.runtime.Debugging
|
import kotlin.native.runtime.Debugging
|
||||||
|
|||||||
@@ -244,4 +244,5 @@ fun createCoroutineUninterceptedAndResume(fn: suspend () -> Any?, resultHolder:
|
|||||||
fun createCoroutineUninterceptedAndResume(fn: suspend Any?.() -> Any?, receiver: Any?, resultHolder: ResultHolder<Any?>) =
|
fun createCoroutineUninterceptedAndResume(fn: suspend Any?.() -> Any?, receiver: Any?, resultHolder: ResultHolder<Any?>) =
|
||||||
fn.createCoroutine(receiver, ResultHolderCompletion(resultHolder)).resume(Unit)
|
fn.createCoroutine(receiver, ResultHolderCompletion(resultHolder)).resume(Unit)
|
||||||
|
|
||||||
|
@OptIn(kotlin.native.runtime.NativeRuntimeApi::class)
|
||||||
fun gc() = kotlin.native.runtime.GC.collect()
|
fun gc() = kotlin.native.runtime.GC.collect()
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
* that can be found in the LICENSE file.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
package deallocretain
|
package deallocretain
|
||||||
|
|
||||||
open class DeallocRetainBase
|
open class DeallocRetainBase
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import kotlin.native.internal.NativePtr
|
|||||||
import kotlin.native.ref.WeakReference
|
import kotlin.native.ref.WeakReference
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
@OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
class KotlinLivenessTracker {
|
class KotlinLivenessTracker {
|
||||||
val weakRefs = mutableListOf<WeakReference<Any>>()
|
val weakRefs = mutableListOf<WeakReference<Any>>()
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
// All classes and methods should be used in tests
|
// All classes and methods should be used in tests
|
||||||
@file:Suppress("UNUSED")
|
@file:Suppress("UNUSED")
|
||||||
@file:OptIn(FreezingIsDeprecated::class, kotlin.native.runtime.NativeRuntimeApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, FreezingIsDeprecated::class, kotlin.native.runtime.NativeRuntimeApi::class)
|
||||||
|
|
||||||
package conversions
|
package conversions
|
||||||
|
|
||||||
@@ -251,6 +251,7 @@ fun IC3.getValue3() = value
|
|||||||
fun IC3?.getValueOrNull3() = this?.value
|
fun IC3?.getValueOrNull3() = this?.value
|
||||||
|
|
||||||
fun isFrozen(obj: Any): Boolean = obj.isFrozen
|
fun isFrozen(obj: Any): Boolean = obj.isFrozen
|
||||||
|
@OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
fun isFreezingEnabled() = Platform.isFreezingEnabled
|
fun isFreezingEnabled() = Platform.isFreezingEnabled
|
||||||
fun kotlinLambda(block: (Any) -> Any): Any = block
|
fun kotlinLambda(block: (Any) -> Any): Any = block
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@file:OptIn(FreezingIsDeprecated::class, ObsoleteWorkersApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, FreezingIsDeprecated::class, ObsoleteWorkersApi::class)
|
||||||
package runtime.atomics.atomic0
|
package runtime.atomics.atomic0
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2018 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
assert(false)
|
assert(false)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2018 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
assert(true)
|
assert(true)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2020 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(ExperimentalStdlibApi::class, FreezingIsDeprecated::class,
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, FreezingIsDeprecated::class,
|
||||||
kotlin.native.runtime.NativeRuntimeApi::class, kotlinx.cinterop.ExperimentalForeignApi::class)
|
kotlin.native.runtime.NativeRuntimeApi::class, kotlinx.cinterop.ExperimentalForeignApi::class)
|
||||||
|
|
||||||
package runtime.basic.cleaner_basic
|
package runtime.basic.cleaner_basic
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2020 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(ExperimentalStdlibApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlin.native.ref.Cleaner
|
import kotlin.native.ref.Cleaner
|
||||||
import kotlin.native.ref.createCleaner
|
import kotlin.native.ref.createCleaner
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2020 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(ExperimentalStdlibApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlin.native.ref.createCleaner
|
import kotlin.native.ref.createCleaner
|
||||||
import kotlin.native.Platform
|
import kotlin.native.Platform
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2020 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(ExperimentalStdlibApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2020 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(ExperimentalStdlibApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2020 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(ExperimentalStdlibApi::class, kotlin.native.runtime.NativeRuntimeApi::class, ObsoleteWorkersApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, kotlin.native.runtime.NativeRuntimeApi::class, ObsoleteWorkersApi::class)
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2020 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(ExperimentalStdlibApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2020 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(ExperimentalStdlibApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2023 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, kotlinx.cinterop.ExperimentalForeignApi::class)
|
||||||
|
|
||||||
package runtime.collections.array5
|
package runtime.collections.array5
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
|
|
||||||
package runtime.collections.hash_map1
|
package runtime.collections.hash_map1
|
||||||
|
|
||||||
import kotlin.native.MemoryModel
|
|
||||||
import kotlin.native.Platform
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
fun assertTrue(cond: Boolean) {
|
fun assertTrue(cond: Boolean) {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2018 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
package runtime.collections.typed_array0
|
package runtime.collections.typed_array0
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* that can be found in the LICENSE file.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@file:OptIn(FreezingIsDeprecated::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, FreezingIsDeprecated::class)
|
||||||
package runtime.collections.typed_array1
|
package runtime.collections.typed_array1
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2020 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(FreezingIsDeprecated::class, kotlin.native.runtime.NativeRuntimeApi::class, ObsoleteWorkersApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, FreezingIsDeprecated::class, kotlin.native.runtime.NativeRuntimeApi::class, ObsoleteWorkersApi::class)
|
||||||
|
|
||||||
package runtime.concurrent.worker_bound_reference0
|
package runtime.concurrent.worker_bound_reference0
|
||||||
|
|
||||||
|
|||||||
@@ -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"
|
// "\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.
|
// 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.test.*
|
||||||
import kotlin.text.Regex
|
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
|
* 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.
|
* 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.*
|
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
|
* 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.
|
* 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.*
|
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
|
* 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.
|
* 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.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* 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.
|
* 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.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* 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.
|
* 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.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlin.text.Regex
|
import kotlin.text.Regex
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlin.text.Regex
|
import kotlin.text.Regex
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
@@ -44,14 +46,14 @@ internal val regex = Regex("^(\\d+)\\ +.*/(.*):(\\d+):.*$")
|
|||||||
internal fun checkFrame(value:String) {
|
internal fun checkFrame(value:String) {
|
||||||
val goldValues = arrayOf<Pair<String, Int>?>(
|
val goldValues = arrayOf<Pair<String, Int>?>(
|
||||||
*arrayOfNulls(expectedExceptionContrFrames),
|
*arrayOfNulls(expectedExceptionContrFrames),
|
||||||
"kt-37572.kt" to 40,
|
"kt-37572.kt" to 42,
|
||||||
"kt-37572.kt" to 31,
|
"kt-37572.kt" to 33,
|
||||||
*(if (expectedInlinesCount != 0) arrayOf(
|
*(if (expectedInlinesCount != 0) arrayOf(
|
||||||
"kt-37572.kt" to 36,
|
"kt-37572.kt" to 38,
|
||||||
"kt-37572.kt" to 29,
|
"kt-37572.kt" to 31,
|
||||||
) else emptyArray()),
|
) else emptyArray()),
|
||||||
"kt-37572.kt" to 19,
|
"kt-37572.kt" to 21,
|
||||||
"kt-37572.kt" to 7)
|
"kt-37572.kt" to 9)
|
||||||
|
|
||||||
val (pos, file, line) = regex.find(value)!!.destructured
|
val (pos, file, line) = regex.find(value)!!.destructured
|
||||||
goldValues[pos.toInt()]?.let {
|
goldValues[pos.toInt()]?.let {
|
||||||
|
|||||||
+2
@@ -1,3 +1,5 @@
|
|||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlin.text.Regex
|
import kotlin.text.Regex
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlin.text.Regex
|
import kotlin.text.Regex
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
@@ -34,8 +36,8 @@ internal fun checkFrame(value:String) {
|
|||||||
val goldValues = arrayOf<Pair<String, Int>?>(
|
val goldValues = arrayOf<Pair<String, Int>?>(
|
||||||
*arrayOfNulls(expectedExceptionContrFrames),
|
*arrayOfNulls(expectedExceptionContrFrames),
|
||||||
*arrayOfNulls(expectedInlinesCount),
|
*arrayOfNulls(expectedInlinesCount),
|
||||||
"stack_trace_inline.kt" to 8,
|
"stack_trace_inline.kt" to 10,
|
||||||
"stack_trace_inline.kt" to 23)
|
"stack_trace_inline.kt" to 25)
|
||||||
val (pos, file, line) = regex.find(value)!!.destructured
|
val (pos, file, line) = regex.find(value)!!.destructured
|
||||||
goldValues[pos.toInt()]?.let {
|
goldValues[pos.toInt()]?.let {
|
||||||
assertEquals(it.first, file)
|
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
|
* 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(ExperimentalStdlibApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlin.text.Regex
|
import kotlin.text.Regex
|
||||||
import kotlin.test.*
|
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
|
* 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(ExperimentalStdlibApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlinx.cinterop.*
|
import kotlinx.cinterop.*
|
||||||
import kotlin.native.Platform
|
import kotlin.native.Platform
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
import kotlinx.cinterop.*
|
import kotlinx.cinterop.*
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2020 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(FreezingIsDeprecated::class, ObsoleteWorkersApi::class, kotlinx.cinterop.ExperimentalForeignApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, FreezingIsDeprecated::class, ObsoleteWorkersApi::class, kotlinx.cinterop.ExperimentalForeignApi::class)
|
||||||
|
|
||||||
package runtime.memory.stable_ref_cross_thread_check
|
package runtime.memory.stable_ref_cross_thread_check
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
@file:OptIn(kotlin.native.runtime.NativeRuntimeApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, kotlin.native.runtime.NativeRuntimeApi::class)
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2018 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
package runtime.text.chars0
|
package runtime.text.chars0
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2018 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
package runtime.text.parse0
|
package runtime.text.parse0
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* that can be found in the LICENSE file.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@file:OptIn(FreezingIsDeprecated::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, FreezingIsDeprecated::class)
|
||||||
package runtime.workers.lazy1
|
package runtime.workers.lazy1
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@file:OptIn(FreezingIsDeprecated::class, kotlin.native.runtime.NativeRuntimeApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, FreezingIsDeprecated::class, kotlin.native.runtime.NativeRuntimeApi::class)
|
||||||
|
|
||||||
import kotlin.native.concurrent.*
|
import kotlin.native.concurrent.*
|
||||||
import kotlin.native.ref.*
|
import kotlin.native.ref.*
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* that can be found in the LICENSE file.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@file:OptIn(FreezingIsDeprecated::class, ObsoleteWorkersApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, FreezingIsDeprecated::class, ObsoleteWorkersApi::class)
|
||||||
package runtime.workers.lazy4
|
package runtime.workers.lazy4
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
@file:OptIn(ObsoleteWorkersApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, ObsoleteWorkersApi::class)
|
||||||
import kotlin.native.concurrent.*
|
import kotlin.native.concurrent.*
|
||||||
import kotlin.native.Platform
|
import kotlin.native.Platform
|
||||||
import kotlinx.cinterop.*
|
import kotlinx.cinterop.*
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@file:OptIn(ObsoleteWorkersApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, ObsoleteWorkersApi::class)
|
||||||
import kotlin.native.concurrent.*
|
import kotlin.native.concurrent.*
|
||||||
import kotlin.native.Platform
|
import kotlin.native.Platform
|
||||||
import kotlinx.cinterop.*
|
import kotlinx.cinterop.*
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* that can be found in the LICENSE file.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@file:OptIn(FreezingIsDeprecated::class, ObsoleteWorkersApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, FreezingIsDeprecated::class, ObsoleteWorkersApi::class)
|
||||||
package runtime.workers.worker11
|
package runtime.workers.worker11
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* that can be found in the LICENSE file.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@file:OptIn(ObsoleteWorkersApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, ObsoleteWorkersApi::class)
|
||||||
package runtime.workers.worker3
|
package runtime.workers.worker3
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* that can be found in the LICENSE file.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@file:OptIn(FreezingIsDeprecated::class, ObsoleteWorkersApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, FreezingIsDeprecated::class, ObsoleteWorkersApi::class)
|
||||||
package runtime.workers.worker6
|
package runtime.workers.worker6
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* that can be found in the LICENSE file.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@file:OptIn(FreezingIsDeprecated::class, ObsoleteWorkersApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, FreezingIsDeprecated::class, ObsoleteWorkersApi::class)
|
||||||
package runtime.workers.worker9_experimentalMM
|
package runtime.workers.worker9_experimentalMM
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@file:OptIn(FreezingIsDeprecated::class, ObsoleteWorkersApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, FreezingIsDeprecated::class, ObsoleteWorkersApi::class)
|
||||||
package runtime.workers.worker_exception_messages
|
package runtime.workers.worker_exception_messages
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* that can be found in the LICENSE file.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@file:OptIn(ObsoleteWorkersApi::class)
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class, ObsoleteWorkersApi::class)
|
||||||
import kotlin.native.concurrent.*
|
import kotlin.native.concurrent.*
|
||||||
import kotlin.native.Platform
|
import kotlin.native.Platform
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
package sanity.assertions_enabled
|
package sanity.assertions_enabled
|
||||||
|
|
||||||
import kotlin.test.Test
|
import kotlin.test.Test
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
* Copyright 2010-2018 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.
|
* that can be found in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
package kotlin.test.tests
|
package kotlin.test.tests
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
|
|
||||||
import kotlin.native.internal.test.*
|
import kotlin.native.internal.test.*
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
import library.*
|
import library.*
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ class AllCodePointsTest {
|
|||||||
fun assertTrue(msg: String, value: Boolean) = assertTrue(value, msg)
|
fun assertTrue(msg: String, value: Boolean) = assertTrue(value, msg)
|
||||||
fun assertFalse(msg: String, value: Boolean) = assertFalse(value, msg)
|
fun assertFalse(msg: String, value: Boolean) = assertFalse(value, msg)
|
||||||
|
|
||||||
|
@OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||||
fun codePointToString(codePoint: Int): String {
|
fun codePointToString(codePoint: Int): String {
|
||||||
val charArray = Char.toChars(codePoint)
|
val charArray = Char.toChars(codePoint)
|
||||||
return charArray.concatToString(0, charArray.size)
|
return charArray.concatToString(0, charArray.size)
|
||||||
|
|||||||
Reference in New Issue
Block a user