Skip to content

Commit

Permalink
Support the current version of Swift Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
younata committed Sep 9, 2024
1 parent e2345cf commit 57dab73
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 81 deletions.
68 changes: 0 additions & 68 deletions [email protected]

This file was deleted.

15 changes: 3 additions & 12 deletions Sources/Nimble/Adapters/NimbleSwiftTestingHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,9 @@ public func recordTestingFailure(_ message: String, location: SourceLocation) {
column: Int(location.column)
)

let issue = Testing.Issue(
kind: .expectationFailed(
Testing.Expectation(
mismatchedErrorDescription: message,
differenceDescription: nil,
isPassing: false,
isRequired: false,
sourceLocation: testingLocation
)
),
sourceContext: SourceContext(sourceLocation: testingLocation)
Testing.Issue.record(
"\(message)",
sourceLocation: testingLocation
)
issue.record()
#endif
}
2 changes: 1 addition & 1 deletion Tests/NimbleTests/SwiftTestingSupportTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import XCTest
@Suite struct SwiftTestingSupportSuite {
@Test func reportsAssertionFailuresToSwiftTesting() {
withKnownIssue {
fail()
expect(1).to(equal(2))
}
}

Expand Down

0 comments on commit 57dab73

Please sign in to comment.