Skip to content

Commit c26e231

Browse files
authored
Merge pull request #257 from ahoppen/parsing-performance-test
Add a parsing performance test
2 parents 577d3bb + 285988e commit c26e231

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import XCTest
2+
import SwiftSyntax
3+
4+
public class ParsingPerformanceTests: XCTestCase {
5+
6+
var inputFile: URL {
7+
return URL(fileURLWithPath: #file)
8+
.deletingLastPathComponent()
9+
.appendingPathComponent("Inputs")
10+
.appendingPathComponent("MinimalCollections.swift.input")
11+
}
12+
13+
func testParsingPerformance() {
14+
measure {
15+
do {
16+
_ = try SyntaxParser.parse(inputFile)
17+
} catch {
18+
XCTFail(error.localizedDescription)
19+
}
20+
}
21+
}
22+
}

0 commit comments

Comments
 (0)