Skip to content

Commit 2e8af1d

Browse files
committed
Fix separators in generated entrypoint code
1 parent c6dc645 commit 2e8af1d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/SWBUniversalPlatform/TestEntryPointGenerationTaskAction.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,12 @@ class TestEntryPointGenerationTaskAction: TaskAction {
156156
157157
"""
158158
for testClass in tests {
159-
fragment += " testCase(["
160-
for method in testClass.testMethods {
159+
160+
let testTuples = testClass.testMethods.map { method in
161161
let basename = method.name.hasSuffix("()") ? String(method.name.dropLast(2)) : method.name
162-
fragment += " (\"\(basename)\", \(testClass.name).\(basename))"
162+
return " (\"\(basename)\", \(testClass.name).\(basename))"
163163
}
164-
fragment += " ]),\n"
164+
fragment += " testCase([\(testTuples.joined(separator: ",\n"))]),\n"
165165
}
166166
fragment += """
167167
]

0 commit comments

Comments
 (0)