@@ -621,12 +621,12 @@ final class RecoveryTests: XCTestCase {
621621 func testRecovery46( ) {
622622 AssertParse (
623623 """
624- switch 1️⃣{
624+ switch 1️⃣{2️⃣
625625 }
626626 """ ,
627627 diagnostics: [
628- DiagnosticSpec ( message: " expected expression in 'switch' statement " )
629- // TODO: Old parser expected error on line 1: 'switch' statement body must have at least one 'case' or 'default' block
628+ DiagnosticSpec ( locationMarker : " 1️⃣ " , message: " expected expression in 'switch' statement " ) ,
629+ DiagnosticSpec ( locationMarker : " 2️⃣ " , message : " 'switch' statement body must have at least one 'case' or 'default' block " )
630630 ]
631631 )
632632 }
@@ -635,12 +635,12 @@ final class RecoveryTests: XCTestCase {
635635 AssertParse (
636636 """
637637 switch 1️⃣
638- {
638+ {2️⃣
639639 }
640640 """ ,
641641 diagnostics: [
642- DiagnosticSpec ( message: " expected expression in 'switch' statement " )
643- // TODO: Old parser expected error on line 1: 'switch' statement body must have at least one 'case' or 'default' block
642+ DiagnosticSpec ( locationMarker : " 1️⃣ " , message: " expected expression in 'switch' statement " ) ,
643+ DiagnosticSpec ( locationMarker : " 2️⃣ " , message : " 'switch' statement body must have at least one 'case' or 'default' block " )
644644 ]
645645 )
646646 }
@@ -669,8 +669,6 @@ final class RecoveryTests: XCTestCase {
669669 diagnostics: [
670670 DiagnosticSpec ( locationMarker: " 1️⃣ " , message: " expected expression in 'switch' statement " ) ,
671671 // TODO: Old parser expected error on line 2: 'is' keyword required to pattern match against type name, Fix-It replacements: 10 - 10 = 'is '
672- DiagnosticSpec ( locationMarker: " 2️⃣ " , message: " 'case' can only appear inside a 'switch' statement or 'enum' declaration " ) ,
673- DiagnosticSpec ( locationMarker: " 3️⃣ " , message: " 'case' can only appear inside a 'switch' statement or 'enum' declaration " ) ,
674672 ]
675673 )
676674 }
0 commit comments