Native: add tests for ExperimentalForeignApi on cinterop declarations
Add tests checking that all (top-level) declarations generated by cinterop now have ExperimentalForeignApi annotation. ^KT-58362
This commit is contained in:
committed by
Space Team
parent
3f3f6eb5a8
commit
bcc4a891be
+23
@@ -0,0 +1,23 @@
|
||||
|
||||
package dependency {
|
||||
|
||||
@ExternalObjCClass(protocolGetter = "kniprot_dependency0_MyProtocol") @ExperimentalForeignApi interface MyProtocolProtocol : ObjCObject {
|
||||
var instanceProperty: Any?
|
||||
@ObjCMethod(encoding = "@16@0:8", isStret = false, selector = "instanceProperty") get
|
||||
@ObjCMethod(encoding = "v24@0:8@16", isStret = false, selector = "setInstanceProperty:") set
|
||||
@ObjCMethod(encoding = "@16@0:8", isStret = false, selector = "instanceMethod") fun instanceMethod(): Any?
|
||||
@ObjCMethod(encoding = "@16@0:8", isStret = false, selector = "instanceProperty") fun instanceProperty(): Any?
|
||||
@ObjCMethod(encoding = "v24@0:8@16", isStret = false, selector = "setInstanceProperty:") fun setInstanceProperty(instanceProperty: Any?)
|
||||
}
|
||||
|
||||
@ExternalObjCClass(protocolGetter = "kniprot_dependency0_MyProtocol") @ExperimentalForeignApi interface MyProtocolProtocolMeta : ObjCObjectMeta /* = ObjCClass */ {
|
||||
var classProperty: Int
|
||||
@ObjCMethod(encoding = "i16@0:8", isStret = false, selector = "classProperty") get
|
||||
@ObjCMethod(encoding = "v20@0:8i16", isStret = false, selector = "setClassProperty:") set
|
||||
@ObjCMethod(encoding = "i16@0:8", isStret = false, selector = "classMethod") fun classMethod(): Int
|
||||
@ObjCMethod(encoding = "i16@0:8", isStret = false, selector = "classProperty") fun classProperty(): Int
|
||||
@ObjCMethod(encoding = "v20@0:8i16", isStret = false, selector = "setClassProperty:") fun setClassProperty(classProperty: Int)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
language = Objective-C
|
||||
headers = objcprotocol.h
|
||||
Reference in New Issue
Block a user