Skip to content

Commit c99e229

Browse files
authored
Merge branch 'main' into Double_optionality
2 parents fd44fb3 + 6bcb7d7 commit c99e229

File tree

2 files changed

+16
-40
lines changed

2 files changed

+16
-40
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- debug
2222
- release
2323
xcode:
24-
- '16.2'
24+
- '16.4'
2525
name: macOS 15
2626
runs-on: macos-15
2727
steps:
@@ -31,31 +31,13 @@ jobs:
3131
- name: Run tests
3232
run: make test-${{ matrix.config }}
3333

34-
macos-14:
35-
strategy:
36-
matrix:
37-
config:
38-
- debug
39-
- release
40-
xcode:
41-
- 15.2
42-
- 15.4
43-
name: macOS 14
44-
runs-on: macos-14
45-
steps:
46-
- uses: actions/checkout@v4
47-
- name: Select Xcode
48-
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
49-
- name: Run tests
50-
run: make test-${{ matrix.config }}
51-
5234
library-evolution:
5335
name: Library evolution
5436
runs-on: macos-15
5537
steps:
5638
- uses: actions/checkout@v4
5739
- name: Select Xcode
58-
run: sudo xcode-select -s /Applications/Xcode_16.2.app
40+
run: sudo xcode-select -s /Applications/Xcode_16.4.app
5941
- name: Run tests
6042
run: make build-for-library-evolution
6143

@@ -66,7 +48,7 @@ jobs:
6648
- Debug
6749
- Release
6850
xcode:
69-
- '16.2'
51+
- '16.4'
7052
name: Examples
7153
runs-on: macos-15
7254
steps:

Sources/IssueReporting/ReportIssue.swift

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public func reportIssue(
4040
IssueContext.current?.line ?? line,
4141
IssueContext.current?.column ?? column
4242
)
43-
guard let context = TestContext.current else {
43+
guard TestContext.current != nil else {
4444
guard !isTesting else { return }
4545
if let observer = FailureObserver.current {
4646
observer.withLock { $0 += 1 }
@@ -66,24 +66,18 @@ public func reportIssue(
6666
}
6767
return
6868
}
69-
70-
switch context {
71-
case .swiftTesting:
72-
_recordIssue(
73-
message: message(),
74-
fileID: "\(fileID)",
75-
filePath: "\(filePath)",
76-
line: Int(line),
77-
column: Int(column)
78-
)
79-
case .xcTest:
80-
_XCTFail(
81-
message().withAppHostWarningIfNeeded() ?? "",
82-
file: filePath,
83-
line: line
84-
)
85-
@unknown default: break
86-
}
69+
_recordIssue(
70+
message: message(),
71+
fileID: "\(fileID)",
72+
filePath: "\(filePath)",
73+
line: Int(line),
74+
column: Int(column)
75+
)
76+
_XCTFail(
77+
message().withAppHostWarningIfNeeded() ?? "",
78+
file: filePath,
79+
line: line
80+
)
8781
}
8882

8983
/// Report a caught error.

0 commit comments

Comments
 (0)