Skip to content

Commit dd7cf3e

Browse files
committed
wip
1 parent 04dc75c commit dd7cf3e

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

Sources/IssueReporting/IssueReporters/BreakpointReporter.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@
3535
raise(SIGTRAP)
3636
}
3737

38-
// TODO: Should this reporter do anything with *expected* issues?
39-
4038
var isDebuggerAttached: Bool {
4139
var name: [Int32] = [CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid()]
4240
var info: kinfo_proc = kinfo_proc()

Sources/IssueReporting/IssueReporters/FatalErrorReporter.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,4 @@ public struct FatalErrorReporter: IssueReporter {
2222
}
2323
Swift.fatalError(message, file: filePath, line: line)
2424
}
25-
26-
// TODO: Should this reporter do anything with *expected* issues?
2725
}

Sources/IssueReporting/IssueReporters/RuntimeWarningReporter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public struct RuntimeWarningReporter: IssueReporter {
5858

5959
@_transparent
6060
public func reportIssue(
61-
_ message: @autoclosure () -> String?, // TODO: Handle `nil`/`""` better
61+
_ message: @autoclosure () -> String?,
6262
fileID: StaticString,
6363
filePath: StaticString,
6464
line: UInt,

Sources/IssueReporting/TestContext.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,18 @@ public enum TestContext {
77
/// The XCTest framework.
88
case xcTest
99

10-
// TODO: Fix docs
1110
/// The context associated with current test.
1211
///
1312
/// How the test context is detected depends on the framework:
1413
///
15-
/// * If Swift Testing is running, _and_ this is called from the current task, this will return
16-
/// ``swiftTesting``. In this way, `TestContext.current == .swiftTesting` is equivalent to
17-
/// checking `Test.current != nil`, but safe to do from library and application code.
14+
/// * If Swift Testing is running, _and_ this is called from the current test's task, this will
15+
/// return ``swiftTesting``. In this way, `TestContext.current == .swiftTesting` is equivalent
16+
/// to checking `Test.current != nil`, but safe to do from library and application code.
1817
///
1918
/// * If XCTest is running, _and_ this is called during the execution of a test _regardless_ of
2019
/// task, this will return ``xcTest``.
2120
///
22-
/// To detect if the current process is a test runner, use ``isTesting``, instead.
21+
/// If executed outside of a test process, this will return `nil`.
2322
public static var current: Self? {
2423
guard isTesting else { return nil }
2524
if _currentTestIsNotNil() {

0 commit comments

Comments
 (0)