Skip to content

Commit f8ed656

Browse files
authored
Merge pull request swiftlang#255 from allevato/fix-busted-tests
Fix some tests that are broken against the latest toolchains.
2 parents fc3fab6 + c155108 commit f8ed656

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

Tests/SwiftFormatRulesTests/ReturnVoidInsteadOfEmptyTupleTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,18 @@ final class ReturnVoidInsteadOfEmptyTupleTests: LintOrFormatRuleTestCase {
9090
input:
9191
"""
9292
let callback: () -> /*foo*/()/*bar*/
93-
let callback: (Int -> /*foo*/ () /*bar*/) -> ()
93+
let callback: ((Int) -> /*foo*/ () /*bar*/) -> ()
9494
""",
9595
expected:
9696
"""
9797
let callback: () -> /*foo*/Void/*bar*/
98-
let callback: (Int -> /*foo*/ Void /*bar*/) -> Void
98+
let callback: ((Int) -> /*foo*/ Void /*bar*/) -> Void
9999
""",
100100
checkForUnassertedDiagnostics: true
101101
)
102102
XCTAssertDiagnosed(.returnVoid, line: 1, column: 28)
103-
XCTAssertDiagnosed(.returnVoid, line: 2, column: 35)
104-
XCTAssertDiagnosed(.returnVoid, line: 2, column: 52)
103+
XCTAssertDiagnosed(.returnVoid, line: 2, column: 37)
104+
XCTAssertDiagnosed(.returnVoid, line: 2, column: 54)
105105
}
106106

107107
func testEmptyTupleWithInternalCommentsIsDiagnosedButNotReplaced() {

Tests/SwiftFormatTests/SyntaxValidatingVisitorTests.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,9 @@ final class SyntaxValidatingVisitorTests: XCTestCase {
3232
input =
3333
"""
3434
switch a {
35-
case b, c, d: break
3635
@unknown what_is_this default: break
3736
}
3837
"""
39-
assertInvalidSyntax(in: input, atLine: 3, column: 1)
40-
41-
input =
42-
"""
43-
@unknown c class Foo {}
44-
"""
4538
assertInvalidSyntax(in: input, atLine: 1, column: 1)
4639
}
4740

0 commit comments

Comments
 (0)