Skip to content
Merged
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
8 changes: 6 additions & 2 deletions Tests/SwiftParserTest/Assertions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ extension ParserTestCase {
applyFixIts: [String]? = nil,
fixedSource expectedFixedSource: String? = nil,
options: AssertParseOptions = [],
experimentalFeatures: Parser.ExperimentalFeatures = [],
experimentalFeatures: Parser.ExperimentalFeatures? = nil,
file: StaticString = #file,
line: UInt = #line
) {
Expand Down Expand Up @@ -610,6 +610,8 @@ extension ParserTestCase {
/// - applyFixIts: Applies only the fix-its with these messages.
/// - fixedSource: Asserts that the source after applying fix-its matches
/// this string.
/// - experimentalFeatures: A list of experimental features to enable, or
/// `nil` to enable the default set of features provided by the test case.
func assertParse<S: SyntaxProtocol>(
_ markedSource: String,
_ parse: (inout Parser) -> S,
Expand All @@ -619,10 +621,12 @@ extension ParserTestCase {
applyFixIts: [String]? = nil,
fixedSource expectedFixedSource: String? = nil,
options: AssertParseOptions = [],
experimentalFeatures: Parser.ExperimentalFeatures = [],
experimentalFeatures: Parser.ExperimentalFeatures? = nil,
file: StaticString = #file,
line: UInt = #line
) {
let experimentalFeatures = experimentalFeatures ?? self.experimentalFeatures

// Verify the parser can round-trip the source
var (markerLocations, source) = extractMarkers(markedSource)
markerLocations["START"] = 0
Expand Down