Skip to content

Commit

Permalink
Merge pull request Quick#1291 from Quick/add_nullability_annotations
Browse files Browse the repository at this point in the history
Add nullability annotations to the objective-c header files
  • Loading branch information
younata authored Jul 23, 2024
2 parents a5b8295 + 66736b4 commit 20d5e04
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Sources/Quick/Async/AsyncSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ open class AsyncSpec: AsyncSpecBase {
}

#if SWIFT_PACKAGE
open override class func _qck_testMethodSelectors() -> [String]! {
open override class func _qck_testMethodSelectors() -> [String] {
darwinXCTestMethodSelectors()
}
#endif // SWIFT_PACKAGE

@objc
internal class func darwinXCTestMethodSelectors() -> [String]! {
internal class func darwinXCTestMethodSelectors() -> [String] {
let examples = AsyncWorld.sharedWorld.examples(forSpecClass: self)

var selectorNames = Set<String>()
Expand Down
4 changes: 4 additions & 0 deletions Sources/QuickObjCRuntime/include/QuickSpecBase.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#import <Foundation/Foundation.h>
#import <XCTest/XCTest.h>

NS_ASSUME_NONNULL_BEGIN

@interface _QuickSpecBase : XCTestCase
+ (NSArray<NSString *> *)_qck_testMethodSelectors;
- (instancetype)init NS_DESIGNATED_INITIALIZER;
@end

NS_ASSUME_NONNULL_END
4 changes: 4 additions & 0 deletions Sources/QuickObjectiveC/Configuration/QuickConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

@class QCKConfiguration;

NS_ASSUME_NONNULL_BEGIN

/**
Subclass QuickConfiguration and override the +[QuickConfiguration configure:]
method in order to configure how Quick behaves when running specs, or to define
Expand All @@ -28,3 +30,5 @@
+ (void)configure:(QCKConfiguration *)configuration;

@end

NS_ASSUME_NONNULL_END
7 changes: 6 additions & 1 deletion Sources/QuickObjectiveC/DSL/QCKDSL.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

@class ExampleMetadata;

NS_ASSUME_NONNULL_BEGIN

/**
Provides a hook for Quick to be configured before any examples are run.
Within this scope, override the +[QuickConfiguration configure:] method
Expand Down Expand Up @@ -45,7 +47,7 @@
} \
@end \

typedef NSDictionary *(^QCKDSLSharedExampleContext)(void);
typedef NSDictionary *_Nonnull(^QCKDSLSharedExampleContext)(void);
typedef void (^QCKDSLSharedExampleBlock)(QCKDSLSharedExampleContext);
typedef void (^QCKDSLEmptyBlock)(void);
typedef void (^QCKDSLExampleMetadataBlock)(ExampleMetadata *exampleMetadata);
Expand Down Expand Up @@ -274,3 +276,6 @@ QUICK_EXPORT QCKItBehavesLikeBlock qck_itBehavesLike_builder(NSString *file, NSU
QUICK_EXPORT QCKItBehavesLikeBlock qck_xitBehavesLike_builder(NSString *file, NSUInteger line) NS_SWIFT_UNAVAILABLE("");
QUICK_EXPORT QCKItBehavesLikeBlock qck_fitBehavesLike_builder(NSString *file, NSUInteger line) NS_SWIFT_UNAVAILABLE("");
QUICK_EXPORT QCKItBlock qck_pending_builder(NSString *file, NSUInteger line) NS_SWIFT_UNAVAILABLE("");

NS_ASSUME_NONNULL_END

0 comments on commit 20d5e04

Please sign in to comment.