@@ -60,9 +60,9 @@ final class AttributeTests: XCTestCase {
6060 @_specialize(e1️⃣
6161 """ ,
6262 diagnostics: [
63- DiagnosticSpec ( message: " expected ':' in attribute argument " ) ,
64- DiagnosticSpec ( message: " expected ')' to end attribute " ) ,
65- DiagnosticSpec ( message: " expected declaration after attribute " ) ,
63+ DiagnosticSpec ( message: " expected ':' in attribute argument " , fixIts : [ " insert ':' " ] ) ,
64+ DiagnosticSpec ( message: " expected ')' to end attribute " , fixIts : [ " insert ')' " ] ) ,
65+ DiagnosticSpec ( message: " expected declaration after attribute " , fixIts : [ " insert declaration " ] ) ,
6666 ]
6767 )
6868 }
@@ -73,9 +73,9 @@ final class AttributeTests: XCTestCase {
7373 @_specialize(e1️⃣, exported2️⃣)3️⃣
7474 """ ,
7575 diagnostics: [
76- DiagnosticSpec ( locationMarker: " 1️⃣ " , message: " expected ':' in attribute argument " ) ,
77- DiagnosticSpec ( locationMarker: " 2️⃣ " , message: " expected ': false' in attribute argument " ) ,
78- DiagnosticSpec ( locationMarker: " 3️⃣ " , message: " expected declaration after attribute " ) ,
76+ DiagnosticSpec ( locationMarker: " 1️⃣ " , message: " expected ':' in attribute argument " , fixIts : [ " insert ':' " ] ) ,
77+ DiagnosticSpec ( locationMarker: " 2️⃣ " , message: " expected ': false' in attribute argument " , fixIts : [ " insert ': false' " ] ) ,
78+ DiagnosticSpec ( locationMarker: " 3️⃣ " , message: " expected declaration after attribute " , fixIts : [ " insert declaration " ] ) ,
7979 ]
8080 )
8181 }
@@ -309,7 +309,7 @@ final class AttributeTests: XCTestCase {
309309 func testMissingDeclarationAfterAttributes( ) {
310310 assertParse (
311311 " @resultBuilder1️⃣ " ,
312- diagnostics: [ DiagnosticSpec ( message: " expected declaration after attribute " ) ] ,
312+ diagnostics: [ DiagnosticSpec ( message: " expected declaration after attribute " , fixIts : [ " insert declaration " ] ) ] ,
313313 fixedSource: """
314314 @resultBuilder
315315 <#declaration#>
@@ -426,7 +426,7 @@ final class AttributeTests: XCTestCase {
426426 @_expose(Cxx, 1️⃣baz) func foo() {}
427427 """ ,
428428 diagnostics: [
429- DiagnosticSpec ( message: " expected string literal to end @_expose arguments " ) ,
429+ DiagnosticSpec ( message: " expected string literal to end @_expose arguments " , fixIts : [ " insert string literal " ] ) ,
430430 DiagnosticSpec ( message: " unexpected code 'baz' in attribute " ) ,
431431 ]
432432 )
@@ -476,7 +476,7 @@ final class AttributeTests: XCTestCase {
476476 func foo() {}
477477 """ ,
478478 diagnostics: [
479- DiagnosticSpec ( message: " expected 'message' in @_unavailableFromAsync argument " ) ,
479+ DiagnosticSpec ( message: " expected 'message' in @_unavailableFromAsync argument " , fixIts : [ " insert 'message' " ] ) ,
480480 DiagnosticSpec ( message: " unexpected code 'nope' before @_unavailableFromAsync argument " ) ,
481481 ]
482482 )
@@ -487,7 +487,7 @@ final class AttributeTests: XCTestCase {
487487 func foo() {}
488488 """ ,
489489 diagnostics: [
490- DiagnosticSpec ( message: " expected ':' and string literal in @_unavailableFromAsync argument " ) ,
490+ DiagnosticSpec ( message: " expected ':' and string literal in @_unavailableFromAsync argument " , fixIts : [ " insert ':' and string literal " ] ) ,
491491 DiagnosticSpec ( message: #"unexpected code '= "abc"' in attribute"# ) ,
492492 ]
493493 )
@@ -498,7 +498,7 @@ final class AttributeTests: XCTestCase {
498498 func foo() {}
499499 """ ,
500500 diagnostics: [
501- DiagnosticSpec ( message: " expected string literal to end @_unavailableFromAsync argument " ) ,
501+ DiagnosticSpec ( message: " expected string literal to end @_unavailableFromAsync argument " , fixIts : [ " insert string literal " ] ) ,
502502 DiagnosticSpec ( message: " unexpected code 'abc' in attribute " ) ,
503503 ]
504504 )
0 commit comments