Skip to content

Commit 250d2c2

Browse files
authored
Fix package tool unit tests that assumed that .currentVersion meant .v5_3 (#3196)
This caused warnings, and then the tests failed because there were diagnostics.
1 parent a3dd078 commit 250d2c2

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Tests/CommandsTests/PackageToolTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ final class PackageToolTests: XCTestCase {
357357
name: "PackageA",
358358
path: "/PackageA",
359359
url: "/PackageA",
360-
v: .currentToolsVersion,
360+
v: .v5_3,
361361
packageKind: .root,
362362
dependencies: [
363363
.init(name: "PackageB", url: "/PackageB", requirement: .localPackage),
@@ -375,7 +375,7 @@ final class PackageToolTests: XCTestCase {
375375
name: "PackageB",
376376
path: "/PackageB",
377377
url: "/PackageB",
378-
v: .currentToolsVersion,
378+
v: .v5_3,
379379
packageKind: .local,
380380
dependencies: [
381381
.init(name: "PackageC", url: "/PackageC", requirement: .localPackage),
@@ -393,7 +393,7 @@ final class PackageToolTests: XCTestCase {
393393
name: "PackageC",
394394
path: "/PackageC",
395395
url: "/PackageC",
396-
v: .currentToolsVersion,
396+
v: .v5_3,
397397
packageKind: .local,
398398
dependencies: [
399399
.init(name: "PackageD", url: "/PackageD", requirement: .localPackage),
@@ -410,7 +410,7 @@ final class PackageToolTests: XCTestCase {
410410
name: "PackageD",
411411
path: "/PackageD",
412412
url: "/PackageD",
413-
v: .currentToolsVersion,
413+
v: .v5_3,
414414
packageKind: .local,
415415
products: [
416416
.init(name: "PackageD", type: .library(.dynamic), targets: ["TargetD"])

Tests/PackageCollectionsTests/PackageCollectionsTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ final class PackageCollectionsTests: XCTestCase {
371371
packageName: UUID().uuidString,
372372
targets: mockTargets,
373373
products: mockProducts,
374-
toolsVersion: .currentToolsVersion,
374+
toolsVersion: .v5_3,
375375
minimumPlatformVersions: nil,
376376
verifiedCompatibility: nil,
377377
license: nil)
@@ -521,7 +521,7 @@ final class PackageCollectionsTests: XCTestCase {
521521
packageName: UUID().uuidString,
522522
targets: mockTargets,
523523
products: mockProducts,
524-
toolsVersion: .currentToolsVersion,
524+
toolsVersion: .v5_3,
525525
minimumPlatformVersions: nil,
526526
verifiedCompatibility: nil,
527527
license: nil)
@@ -823,7 +823,7 @@ final class PackageCollectionsTests: XCTestCase {
823823
packageName: "package-\(packageId)",
824824
targets: targets,
825825
products: products,
826-
toolsVersion: .currentToolsVersion,
826+
toolsVersion: .v5_3,
827827
minimumPlatformVersions: [.init(platform: .macOS, version: .init("10.15"))],
828828
verifiedCompatibility: [
829829
.init(platform: .iOS, swiftVersion: SwiftLanguageVersion.knownSwiftLanguageVersions.randomElement()!),

Tests/PackageCollectionsTests/Utility.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func makeMockCollections(count: Int = Int.random(in: 50 ... 100), maxPackages: I
5757
packageName: "package-\(packageIndex)",
5858
targets: targets,
5959
products: products,
60-
toolsVersion: .currentToolsVersion,
60+
toolsVersion: .v5_3,
6161
minimumPlatformVersions: minimumPlatformVersions,
6262
verifiedCompatibility: verifiedCompatibility,
6363
license: license)

0 commit comments

Comments
 (0)