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 f3f7153
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 118 deletions.
17 changes: 0 additions & 17 deletions Nimble.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@
8922828F2B283956002DA355 /* AsyncAwaitTest+Require.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8922828E2B283956002DA355 /* AsyncAwaitTest+Require.swift */; };
8923E60D2B47CE7E00F3961A /* Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8923E60C2B47CE7E00F3961A /* Map.swift */; };
8923E6102B47D08300F3961A /* MapTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8923E60E2B47D06E00F3961A /* MapTest.swift */; };
8924FE0B2C1CA6BB00A9062A /* Testing in Frameworks */ = {isa = PBXBuildFile; productRef = 8924FE0A2C1CA6BB00A9062A /* Testing */; };
892FDF1329D3EA7700523A80 /* AsyncExpression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 892FDF1229D3EA7700523A80 /* AsyncExpression.swift */; };
895644DD2C1B63910006EC12 /* NimbleSwiftTestingHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 895644DC2C1B63910006EC12 /* NimbleSwiftTestingHandler.swift */; };
895644DF2C1B71DE0006EC12 /* SwiftTestingSupportTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 895644DE2C1B71DE0006EC12 /* SwiftTestingSupportTest.swift */; };
Expand Down Expand Up @@ -379,7 +378,6 @@
buildActionMask = 2147483647;
files = (
89D8AC872B3211EA00410644 /* CwlPosixPreconditionTesting in Frameworks */,
8924FE0B2C1CA6BB00A9062A /* Testing in Frameworks */,
89D8AC852B3211C600410644 /* CwlCatchException in Frameworks */,
89D8AC892B3211EA00410644 /* CwlPreconditionTesting in Frameworks */,
);
Expand Down Expand Up @@ -735,7 +733,6 @@
89D8AC842B3211C600410644 /* CwlCatchException */,
89D8AC862B3211EA00410644 /* CwlPosixPreconditionTesting */,
89D8AC882B3211EA00410644 /* CwlPreconditionTesting */,
8924FE0A2C1CA6BB00A9062A /* Testing */,
);
productName = "Nimble-macOS";
productReference = 1F925EAD195C0D6300ED456B /* Nimble.framework */;
Expand Down Expand Up @@ -797,7 +794,6 @@
packageReferences = (
89D8AC812B32119300410644 /* XCRemoteSwiftPackageReference "CwlCatchException" */,
89D8AC822B3211A900410644 /* XCRemoteSwiftPackageReference "CwlPreconditionTesting" */,
8924FE092C1CA6BB00A9062A /* XCRemoteSwiftPackageReference "swift-testing" */,
);
productRefGroup = 1F1A742A1940169200FFFC47 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -1370,14 +1366,6 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
8924FE092C1CA6BB00A9062A /* XCRemoteSwiftPackageReference "swift-testing" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/younata/swift-testing";
requirement = {
branch = "public-issues-pitch";
kind = branch;
};
};
89D8AC812B32119300410644 /* XCRemoteSwiftPackageReference "CwlCatchException" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/mattgallagher/CwlCatchException";
Expand All @@ -1397,11 +1385,6 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
8924FE0A2C1CA6BB00A9062A /* Testing */ = {
isa = XCSwiftPackageProductDependency;
package = 8924FE092C1CA6BB00A9062A /* XCRemoteSwiftPackageReference "swift-testing" */;
productName = Testing;
};
89D8AC842B3211C600410644 /* CwlCatchException */ = {
isa = XCSwiftPackageProductDependency;
package = 89D8AC812B32119300410644 /* XCRemoteSwiftPackageReference "CwlCatchException" */;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"originHash" : "f14c33ce48473aca15a7346134d7546c72ed4d7b9e9e62243a4682949138cbe2",
"pins" : [
{
"identity" : "cwlcatchexception",
Expand All @@ -18,25 +17,7 @@
"revision" : "dc9af4781f2afdd1e68e90f80b8603be73ea7abc",
"version" : "2.2.0"
}
},
{
"identity" : "swift-syntax",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-syntax.git",
"state" : {
"revision" : "4c6cc0a3b9e8f14b3ae2307c5ccae4de6167ac2c",
"version" : "600.0.0-prerelease-2024-06-12"
}
},
{
"identity" : "swift-testing",
"kind" : "remoteSourceControl",
"location" : "https://github.com/younata/swift-testing",
"state" : {
"branch" : "public-issues-pitch",
"revision" : "e945bad553d3c0b66ca489e2d52ad26119ce818d"
}
}
],
"version" : 3
"version" : 2
}
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 f3f7153

Please sign in to comment.