Skip to content

Commit aa6b163

Browse files
committed
Fix some test failures
1 parent 109949e commit aa6b163

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Tests/SwiftSyntaxTest/SyntaxFactoryTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ public class SyntaxFactoryTests: XCTestCase {
6161

6262
public func testTokenSyntax() {
6363
let tok = SyntaxFactory.makeStructKeyword()
64-
XCTAssertEqual("\(tok)", "struct")
64+
XCTAssertEqual("\(tok)", "struct ")
6565
XCTAssertTrue(tok.isPresent)
6666

6767
let preSpacedTok = tok.withLeadingTrivia(.spaces(3))
68-
XCTAssertEqual("\(preSpacedTok)", " struct")
68+
XCTAssertEqual("\(preSpacedTok)", " struct ")
6969

7070
var mutablePreSpacedTok = tok
7171
mutablePreSpacedTok.leadingTrivia = .spaces(4)
72-
XCTAssertEqual("\(mutablePreSpacedTok)", " struct")
72+
XCTAssertEqual("\(mutablePreSpacedTok)", " struct ")
7373

7474
let postSpacedTok = tok.withTrailingTrivia(.spaces(6))
7575
XCTAssertEqual("\(postSpacedTok)", "struct ")

Tests/SwiftSyntaxTest/SyntaxTreeModifierTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import SwiftSyntax
44
fileprivate func cannedVarDecl() -> VariableDeclSyntax {
55
let identifierPattern = SyntaxFactory.makeIdentifierPattern(
66
identifier: SyntaxFactory.makeIdentifier("a")
7-
.withLeadingTrivia(.spaces(1))
87
)
98
let Pattern = SyntaxFactory.makePatternBinding(
109
pattern: PatternSyntax(identifierPattern),

0 commit comments

Comments
 (0)