[K/N] Added a test for #KT-56521

This commit is contained in:
Igor Chevdar
2023-02-09 18:57:54 +02:00
committed by Space Team
parent a71a94add7
commit 2281d9700d
5 changed files with 85 additions and 0 deletions
@@ -1161,6 +1161,22 @@ __attribute__((swift_name("Kt55736Kt")))
+ (NSArray<KtInt *> *)callbackBlock:(id<KtKotlinSuspendFunction1>)block __attribute__((swift_name("callback(block:)")));
@end
__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("Kt56521")))
@interface KtKt56521 : KtBase
+ (instancetype)alloc __attribute__((unavailable));
+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable));
+ (instancetype)kt56521 __attribute__((swift_name("init()")));
@property (class, readonly, getter=shared) KtKt56521 *shared __attribute__((swift_name("shared")));
@end
__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("Kt56521Kt")))
@interface KtKt56521Kt : KtBase
+ (KtKt56521 *)getKt56521 __attribute__((swift_name("getKt56521()")));
@property (class) int32_t initialized __attribute__((swift_name("initialized")));
@end
__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("LibraryKt")))
@interface KtLibraryKt : KtBase
@@ -1096,6 +1096,22 @@ __attribute__((swift_name("Kt55736Kt")))
+ (NSArray<KtInt *> *)callbackBlock:(id<KtKotlinSuspendFunction1>)block __attribute__((swift_name("callback(block:)")));
@end
__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("Kt56521")))
@interface KtKt56521 : KtBase
+ (instancetype)alloc __attribute__((unavailable));
+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable));
+ (instancetype)kt56521 __attribute__((swift_name("init()")));
@property (class, readonly, getter=shared) KtKt56521 *shared __attribute__((swift_name("shared")));
@end
__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("Kt56521Kt")))
@interface KtKt56521Kt : KtBase
+ (KtKt56521 *)getKt56521 __attribute__((swift_name("getKt56521()")));
@property (class) int32_t initialized __attribute__((swift_name("initialized")));
@end
__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("LibraryKt")))
@interface KtLibraryKt : KtBase
@@ -1096,6 +1096,22 @@ __attribute__((swift_name("Kt55736Kt")))
+ (NSArray<KtInt *> *)callbackBlock:(id<KtKotlinSuspendFunction1>)block __attribute__((swift_name("callback(block:)")));
@end
__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("Kt56521")))
@interface KtKt56521 : KtBase
+ (instancetype)alloc __attribute__((unavailable));
+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable));
+ (instancetype)kt56521 __attribute__((swift_name("init()")));
@property (class, readonly, getter=shared) KtKt56521 *shared __attribute__((swift_name("shared")));
@end
__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("Kt56521Kt")))
@interface KtKt56521Kt : KtBase
+ (KtKt56521 *)getKt56521 __attribute__((swift_name("getKt56521()")));
@property (class) int32_t initialized __attribute__((swift_name("initialized")));
@end
__attribute__((objc_subclassing_restricted))
__attribute__((swift_name("LibraryKt")))
@interface KtLibraryKt : KtBase
@@ -0,0 +1,17 @@
/*
* 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.
*/
var initialized = 0
object Kt56521 {
init {
initialized = 1
}
}
fun getKt56521(): Kt56521 {
Kt56521
return Kt56521
}
@@ -0,0 +1,20 @@
/*
* 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 Kt
func testKt56521() throws {
let object = Kt56521()
try assertTrue(object is Kt56521)
try assertEquals(actual: Kt56521Kt.initialized, expected: 1)
}
class Kt56521Tests : SimpleTestProvider {
override init() {
super.init()
test("testKt56521", testKt56521)
}
}