diff --git a/Package@swift-6.0.swift b/Package@swift-6.0.swift deleted file mode 100644 index e54ec4c6f..000000000 --- a/Package@swift-6.0.swift +++ /dev/null @@ -1,68 +0,0 @@ -// swift-tools-version:6.0 -import PackageDescription - -let package = Package( - name: "Nimble", - platforms: [ - .macOS(.v10_15), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .visionOS(.v1) - ], - products: [ - .library( - name: "Nimble", - targets: { - var targets: [String] = ["Nimble"] - #if os(macOS) - targets.append("NimbleObjectiveC") - #endif - return targets - }() - ), - ], - dependencies: [ - .package(url: "https://github.com/mattgallagher/CwlPreconditionTesting.git", .upToNextMajor(from: "2.2.0")), - .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"), - .package(url: "https://github.com/younata/swift-testing", branch: "public-issues-pitch") - ], - targets: { - var testHelperDependencies: [PackageDescription.Target.Dependency] = ["Nimble"] - #if os(macOS) - testHelperDependencies.append("NimbleObjectiveC") - #endif - var targets: [Target] = [ - .target( - name: "Nimble", - dependencies: [ - .product(name: "CwlPreconditionTesting", package: "CwlPreconditionTesting", - condition: .when(platforms: [.macOS, .iOS, .macCatalyst, .visionOS])), - .product(name: "CwlPosixPreconditionTesting", package: "CwlPreconditionTesting", - condition: .when(platforms: [.tvOS, .watchOS])), - .product(name: "Testing", package: "swift-testing") - ], - exclude: ["Info.plist"] - ), - .target( - name: "NimbleSharedTestHelpers", - dependencies: testHelperDependencies - ), - .testTarget( - name: "NimbleTests", - dependencies: ["Nimble", "NimbleSharedTestHelpers"], - exclude: ["Info.plist"] - ), - ] -#if os(macOS) - targets.append(contentsOf: [ - .target( - name: "NimbleObjectiveC", - dependencies: ["Nimble"] - ), - .testTarget( - name: "NimbleObjectiveCTests", - dependencies: ["NimbleObjectiveC", "Nimble", "NimbleSharedTestHelpers"] - ) - ]) - #endif - return targets - }(), - swiftLanguageVersions: [.v5] -) diff --git a/Sources/Nimble/Adapters/NimbleSwiftTestingHandler.swift b/Sources/Nimble/Adapters/NimbleSwiftTestingHandler.swift index a37811e87..ebd2aa11c 100644 --- a/Sources/Nimble/Adapters/NimbleSwiftTestingHandler.swift +++ b/Sources/Nimble/Adapters/NimbleSwiftTestingHandler.swift @@ -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 } diff --git a/Tests/NimbleTests/SwiftTestingSupportTest.swift b/Tests/NimbleTests/SwiftTestingSupportTest.swift index 39e5b917e..d54a9346a 100644 --- a/Tests/NimbleTests/SwiftTestingSupportTest.swift +++ b/Tests/NimbleTests/SwiftTestingSupportTest.swift @@ -6,7 +6,7 @@ import XCTest @Suite struct SwiftTestingSupportSuite { @Test func reportsAssertionFailuresToSwiftTesting() { withKnownIssue { - fail() + expect(1).to(equal(2)) } }