Skip to content

Commit

Permalink
Fix some test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
fwcd committed Jun 25, 2022
1 parent 109949e commit aa6b163
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Tests/SwiftSyntaxTest/SyntaxFactoryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ public class SyntaxFactoryTests: XCTestCase {

public func testTokenSyntax() {
let tok = SyntaxFactory.makeStructKeyword()
XCTAssertEqual("\(tok)", "struct")
XCTAssertEqual("\(tok)", "struct ")
XCTAssertTrue(tok.isPresent)

let preSpacedTok = tok.withLeadingTrivia(.spaces(3))
XCTAssertEqual("\(preSpacedTok)", " struct")
XCTAssertEqual("\(preSpacedTok)", " struct ")

var mutablePreSpacedTok = tok
mutablePreSpacedTok.leadingTrivia = .spaces(4)
XCTAssertEqual("\(mutablePreSpacedTok)", " struct")
XCTAssertEqual("\(mutablePreSpacedTok)", " struct ")

let postSpacedTok = tok.withTrailingTrivia(.spaces(6))
XCTAssertEqual("\(postSpacedTok)", "struct ")
Expand Down
1 change: 0 additions & 1 deletion Tests/SwiftSyntaxTest/SyntaxTreeModifierTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import SwiftSyntax
fileprivate func cannedVarDecl() -> VariableDeclSyntax {
let identifierPattern = SyntaxFactory.makeIdentifierPattern(
identifier: SyntaxFactory.makeIdentifier("a")
.withLeadingTrivia(.spaces(1))
)
let Pattern = SyntaxFactory.makePatternBinding(
pattern: PatternSyntax(identifierPattern),
Expand Down

0 comments on commit aa6b163

Please sign in to comment.