[ObjCExport] Cleanup misleading test name for 'functionWithMustBeDocumentedAnnotation'
This commit is contained in:
committed by
Space Team
parent
7944a3dc4b
commit
1cb60a53d9
+5
@@ -115,6 +115,11 @@ class ObjCExportHeaderGeneratorTest(val generator: HeaderGenerator) {
|
||||
doTest(headersTestDataDir.resolve("kdocWithBlockTags"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test - classWithMustBeDocumentedAnnotation`() {
|
||||
doTest(headersTestDataDir.resolve("classWithMustBeDocumentedAnnotation"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test - functionWithMustBeDocumentedAnnotation`() {
|
||||
doTest(headersTestDataDir.resolve("functionWithMustBeDocumentedAnnotation"))
|
||||
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSError.h>
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSSet.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunknown-warning-option"
|
||||
#pragma clang diagnostic ignored "-Wincompatible-property-type"
|
||||
#pragma clang diagnostic ignored "-Wnullability"
|
||||
|
||||
#pragma push_macro("_Nullable_result")
|
||||
#if !__has_feature(nullability_nullable_result)
|
||||
#undef _Nullable_result
|
||||
#define _Nullable_result _Nullable
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @note annotations
|
||||
* ImportantAnnotation
|
||||
*/
|
||||
__attribute__((objc_subclassing_restricted))
|
||||
@interface Foo : Base
|
||||
- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer));
|
||||
+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead")));
|
||||
@end
|
||||
|
||||
#pragma pop_macro("_Nullable_result")
|
||||
#pragma clang diagnostic pop
|
||||
NS_ASSUME_NONNULL_END
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
@kotlin.annotation.MustBeDocumented
|
||||
annotation class ImportantAnnotation
|
||||
|
||||
@ImportantAnnotation
|
||||
class Foo
|
||||
+3
-4
@@ -18,15 +18,14 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
#define _Nullable_result _Nullable
|
||||
#endif
|
||||
|
||||
__attribute__((objc_subclassing_restricted))
|
||||
@interface FooKt : Base
|
||||
|
||||
/**
|
||||
* @note annotations
|
||||
* ImportantAnnotation
|
||||
*/
|
||||
__attribute__((objc_subclassing_restricted))
|
||||
@interface Foo : Base
|
||||
- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer));
|
||||
+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead")));
|
||||
+ (void)fooMyParameter:(NSString *)myParameter __attribute__((swift_name("foo(myParameter:)")));
|
||||
@end
|
||||
|
||||
#pragma pop_macro("_Nullable_result")
|
||||
|
||||
Vendored
+1
-1
@@ -2,4 +2,4 @@
|
||||
annotation class ImportantAnnotation
|
||||
|
||||
@ImportantAnnotation
|
||||
class Foo
|
||||
fun foo(myParameter: String) = Unit
|
||||
Reference in New Issue
Block a user