Skip to content

Commit f8db3a9

Browse files
committed
[Tests] swift-package-migrate: Add test for multiple files
1 parent 9034e62 commit f8db3a9

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

Fixtures/SwiftMigrate/InferIsolatedConformancesMigration/Sources/Fixed/Test.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,3 @@ class C: nonisolated Equatable {
66
lhs.name == rhs.name
77
}
88
}
9-
10-
protocol P {}
11-
protocol Q {}
12-
13-
@MainActor
14-
struct S: nonisolated P & Q {}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
protocol P {}
2+
protocol Q {}
3+
4+
@MainActor
5+
struct S: nonisolated P & Q {}

Fixtures/SwiftMigrate/InferIsolatedConformancesMigration/Sources/Test.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,3 @@ class C: Equatable {
66
lhs.name == rhs.name
77
}
88
}
9-
10-
protocol P {}
11-
protocol Q {}
12-
13-
@MainActor
14-
struct S: P & Q {}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
protocol P {}
2+
protocol Q {}
3+
4+
@MainActor
5+
struct S: P & Q {}

Tests/CommandsTests/PackageCommandTests.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2112,7 +2112,7 @@ class PackageCommandTestCase: CommandsBuildProviderTestCase {
21122112
"skipping because test environment compiler doesn't support `-print-supported-features`"
21132113
)
21142114

2115-
func doMigration(featureName: String, expectedSummary: String) async throws {
2115+
func doMigration(featureName: String, expectedSummary: String) async throws {
21162116
try await fixture(name: "SwiftMigrate/\(featureName)Migration") { fixturePath in
21172117
let sourcePaths: [AbsolutePath]
21182118
let fixedSourcePaths: [AbsolutePath]
@@ -2151,9 +2151,11 @@ class PackageCommandTestCase: CommandsBuildProviderTestCase {
21512151
}
21522152
}
21532153

2154+
// When updating these, make sure we keep testing both the singular and
2155+
// plural forms of the nouns in the summary.
21542156
try await doMigration(featureName: "ExistentialAny", expectedSummary: "Applied 5 fix-its in 1 file")
21552157
try await doMigration(featureName: "StrictMemorySafety", expectedSummary: "Applied 1 fix-it in 1 file")
2156-
try await doMigration(featureName: "InferIsolatedConformances", expectedSummary: "Applied 3 fix-its in 1 file")
2158+
try await doMigration(featureName: "InferIsolatedConformances", expectedSummary: "Applied 3 fix-its in 2 files")
21572159
}
21582160

21592161
func testBuildToolPlugin() async throws {

0 commit comments

Comments
 (0)