Skip to content

Commit a36ed26

Browse files
authored
Merge pull request swiftlang#649 from omochi/add-fixed-issues-test
Add tests for already fixed issues
2 parents c0f3642 + c6e1431 commit a36ed26

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Tests/SwiftParserTest/Expressions.swift

+20
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,15 @@ final class ExpressionTests: XCTestCase {
172172
"""
173173
"""#
174174
)
175+
176+
AssertParse(
177+
#"""
178+
"\(()
179+
"""#,
180+
diagnostics: [
181+
// FIXME: Some diagnostics should be emitted for such broken input.
182+
]
183+
)
175184
}
176185

177186
func testStringLiterals() {
@@ -276,6 +285,17 @@ final class ExpressionTests: XCTestCase {
276285
"\(x)"
277286
"""#
278287
)
288+
289+
AssertParse(
290+
##"""
291+
#^D0^#""""#^D1^#
292+
"""##,
293+
diagnostics: [
294+
// FIXME: Weird diagnostics doesn't recover code even if follow it
295+
DiagnosticSpec(locationMarker: "D0", message: "Expected '\"' in expression"),
296+
DiagnosticSpec(locationMarker: "D1", message: "Expected '\"' in expression")
297+
]
298+
)
279299
}
280300

281301
func testSingleQuoteStringLiteral() {

0 commit comments

Comments
 (0)