Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Tests/SwiftSyntaxTest/AbsolutePositionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public class AbsolutePositionTests: XCTestCase {
public func testSourceLocation() {
let filePath = "/tmp/test.swift"
let root = self.createSourceFile(2)
let converter = SourceLocationConverter(file: filePath, tree: root)
let converter = SourceLocationConverter(fileName: filePath, tree: root)
let secondReturnStmt = root.statements[1]
let startLoc = secondReturnStmt.startLocation(converter: converter)
XCTAssertEqual(startLoc.line, 8)
Expand Down
4 changes: 2 additions & 2 deletions Tests/SwiftSyntaxTest/SourceLocationConverterTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fileprivate func assertPresumedSourceLocation(
file: StaticString = #file,
line: UInt = #line
) {
let converter = SourceLocationConverter(file: "input.swift", tree: source)
let converter = SourceLocationConverter(fileName: "input.swift", tree: source)

guard let variableDecl = source.statements.compactMap({ inspectionItemFilter($0.item) }).first else {
XCTFail("Could not find a node that matches the `inspectionItemFilter` in `source`", file: file, line: line)
Expand Down Expand Up @@ -62,7 +62,7 @@ final class SourceLocationConverterTests: XCTestCase {
// ```
// assert(tree.byteSize == endOfFile.utf8Offset)
// ```
_ = SourceLocationConverter(file: "", tree: tree)
_ = SourceLocationConverter(fileName: "", tree: tree)
}

func testSingleSourceLocationDirective() {
Expand Down