Skip to content

Commit 89ff719

Browse files
authored
Fix several compile-time warnings that have snuck in. (#899)
This PR resolves some compile-time warnings that occur when building the package from source. None of these warnings are critical issues. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated.
1 parent 4fa7afb commit 89ff719

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Package.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ let package = Package(
5353
"_TestingInternals",
5454
"TestingMacros",
5555
],
56-
exclude: ["CMakeLists.txt"],
56+
exclude: ["CMakeLists.txt", "Testing.swiftcrossimport"],
5757
cxxSettings: .packageSettings,
5858
swiftSettings: .packageSettings,
5959
linkerSettings: [
@@ -122,6 +122,7 @@ let package = Package(
122122
"Testing",
123123
],
124124
path: "Sources/Overlays/_Testing_Foundation",
125+
exclude: ["CMakeLists.txt"],
125126
swiftSettings: .packageSettings
126127
),
127128
],

Tests/TestingTests/ExitTestTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ private import _TestingInternals
243243
func exitConditionMatching() {
244244
#expect(Optional<ExitCondition>.none == Optional<ExitCondition>.none)
245245
#expect(Optional<ExitCondition>.none === Optional<ExitCondition>.none)
246-
#expect(Optional<ExitCondition>.none !== .success)
247-
#expect(Optional<ExitCondition>.none !== .failure)
246+
#expect(Optional<ExitCondition>.none !== .some(.success))
247+
#expect(Optional<ExitCondition>.none !== .some(.failure))
248248

249249
#expect(ExitCondition.success == .success)
250250
#expect(ExitCondition.success === .success)

Tests/TestingTests/Traits/TimeLimitTraitTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,12 @@ struct TimeLimitTraitTests {
203203
guard case let .issueRecorded(issue) = event.kind,
204204
case .timeLimitExceeded = issue.kind,
205205
let test = context.test,
206-
let testCase = context.testCase
206+
context.testCase != nil
207207
else {
208208
return
209209
}
210210
issueRecorded()
211211
#expect(test.timeLimit == .milliseconds(10))
212-
#expect(testCase != nil)
213212
}
214213

215214
await Test(.timeLimit(.milliseconds(10))) {

0 commit comments

Comments
 (0)