Skip to content

Commit 53e0d93

Browse files
authored
Fix markup for __invokeXCTestCaseMethod(). (#151)
The markup for one of the overloads of `__invokeXCTestCaseMethod()` is incorrect as I forgot to update it after a previous PR (#98). This PR fixes that.
1 parent 35c97f7 commit 53e0d93

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Sources/Testing/Test+Macro.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -547,8 +547,9 @@ let xcTestCaseClass: AnyClass? = {
547547

548548
/// Run a test function as an `XCTestCase`-compatible method.
549549
///
550-
/// This overload is used when XCTest can be directly imported and the compiler
551-
/// can tell that the test suite type is a subclass of `XCTestCase`.
550+
/// This overload is used for types that are classes. If the type is not a
551+
/// subclass of `XCTestCase`, or if XCTest is not loaded in the current process,
552+
/// this function returns immediately.
552553
///
553554
/// - Warning: This function is used to implement the `@Test` macro. Do not call
554555
/// it directly.
@@ -557,8 +558,8 @@ public func __invokeXCTestCaseMethod<T>(
557558
onInstanceOf xcTestCaseSubclass: T.Type,
558559
sourceLocation: SourceLocation
559560
) async throws -> Bool where T: AnyObject {
560-
// Any NSObject subclass might end up on this code path, so only record an
561-
// issue if it is really an XCTestCase subclass.
561+
// All classes will end up on this code path, so only record an issue if it is
562+
// really an XCTestCase subclass.
562563
guard let xcTestCaseClass, isClass(xcTestCaseSubclass, subclassOf: xcTestCaseClass) else {
563564
return false
564565
}

0 commit comments

Comments
 (0)