[K/N][Tests] Migrate test kt40426
^KT-61259
This commit is contained in:
committed by
Space Team
parent
072d191306
commit
3d70be0c5f
@@ -1112,13 +1112,6 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
UtilsKt.dependsOnPlatformLibs(it)
|
||||
}
|
||||
|
||||
standaloneTest("interop_kt40426") {
|
||||
// Test depends on iOS-specific UIKit
|
||||
enabled = (project.testTarget == 'ios_x64' || project.testTarget == 'ios_simulator_arm64' || project.testTarget == 'ios_arm64')
|
||||
source = "interop/objc/kt40426/main.kt"
|
||||
useGoldenData = true
|
||||
UtilsKt.dependsOnPlatformLibs(it)
|
||||
}
|
||||
|
||||
interopTest("interop_objc_kt63423_dispose_on_main_stress") {
|
||||
// Test depends on macOS-specific AppKit
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import kotlinx.cinterop.*
|
||||
import platform.UIKit.*
|
||||
import platform.CoreGraphics.*
|
||||
import platform.Foundation.NSString
|
||||
|
||||
class SmileView(frame: CValue<CGRect>): UIView(frame = frame) {
|
||||
override fun drawRect(rect: CValue<CGRect>) {
|
||||
super.drawRect(rect)
|
||||
|
||||
val smile = ":)" as NSString
|
||||
smile.drawInRect(rect, withAttributes = null)
|
||||
println("SmileView::drawRect")
|
||||
}
|
||||
|
||||
override fun layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
println("SmileView::layoutSubviews")
|
||||
}
|
||||
}
|
||||
|
||||
fun main() {
|
||||
memScoped {
|
||||
val frame = alloc<CGRect>()
|
||||
val x = SmileView(frame.readValue())
|
||||
x.drawRect(frame.readValue())
|
||||
x.layoutSubviews()
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
SmileView::drawRect
|
||||
SmileView::layoutSubviews
|
||||
Reference in New Issue
Block a user