Skip to content

Commit a5a58f8

Browse files
committed
fix test code
1 parent d157198 commit a5a58f8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/SwiftSyntax/ParseFile.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ ParseFile.test("ParseSingleFile") {
3131
let currentFile = URL(fileURLWithPath: #file)
3232
expectDoesNotThrow({
3333
let currentFileContents = try String(contentsOf: currentFile)
34-
let parsed = SourceFileSyntax.decodeSourceFileSyntax(try SourceKitdService.
35-
encodeSourceFileSyntax(currentFile))
34+
let parsed = try SourceFileSyntax.decodeSourceFileSyntax(try
35+
SourceKitdService.encodeSourceFileSyntax(currentFile))
3636
expectEqual("\(parsed)", currentFileContents)
3737
})
3838
}

test/SwiftSyntax/VisitorTest.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ VisitorTests.test("Basic") {
2727
}
2828
}
2929
expectDoesNotThrow({
30-
let parsed = SourceFileSyntax.decodeSourceFileSyntax(try SourceKitdService.
31-
encodeSourceFileSyntax(getInput("visitor.swift")))
30+
let parsed = try SourceFileSyntax.decodeSourceFileSyntax(try
31+
SourceKitdService.encodeSourceFileSyntax(getInput("visitor.swift")))
3232
let counter = FuncCounter()
3333
let hashBefore = parsed.hashValue
3434
counter.visit(parsed)

0 commit comments

Comments
 (0)