@@ -60,9 +60,9 @@ final class AttributeTests: XCTestCase {
60
60
@_specialize(e1️⃣
61
61
""" ,
62
62
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 " ] ) ,
66
66
]
67
67
)
68
68
}
@@ -73,9 +73,9 @@ final class AttributeTests: XCTestCase {
73
73
@_specialize(e1️⃣, exported2️⃣)3️⃣
74
74
""" ,
75
75
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 " ] ) ,
79
79
]
80
80
)
81
81
}
@@ -309,7 +309,7 @@ final class AttributeTests: XCTestCase {
309
309
func testMissingDeclarationAfterAttributes( ) {
310
310
assertParse (
311
311
" @resultBuilder1️⃣ " ,
312
- diagnostics: [ DiagnosticSpec ( message: " expected declaration after attribute " ) ] ,
312
+ diagnostics: [ DiagnosticSpec ( message: " expected declaration after attribute " , fixIts : [ " insert declaration " ] ) ] ,
313
313
fixedSource: """
314
314
@resultBuilder
315
315
<#declaration#>
@@ -426,7 +426,7 @@ final class AttributeTests: XCTestCase {
426
426
@_expose(Cxx, 1️⃣baz) func foo() {}
427
427
""" ,
428
428
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 " ] ) ,
430
430
DiagnosticSpec ( message: " unexpected code 'baz' in attribute " ) ,
431
431
]
432
432
)
@@ -476,7 +476,7 @@ final class AttributeTests: XCTestCase {
476
476
func foo() {}
477
477
""" ,
478
478
diagnostics: [
479
- DiagnosticSpec ( message: " expected 'message' in @_unavailableFromAsync argument " ) ,
479
+ DiagnosticSpec ( message: " expected 'message' in @_unavailableFromAsync argument " , fixIts : [ " insert 'message' " ] ) ,
480
480
DiagnosticSpec ( message: " unexpected code 'nope' before @_unavailableFromAsync argument " ) ,
481
481
]
482
482
)
@@ -487,7 +487,7 @@ final class AttributeTests: XCTestCase {
487
487
func foo() {}
488
488
""" ,
489
489
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 " ] ) ,
491
491
DiagnosticSpec ( message: #"unexpected code '= "abc"' in attribute"# ) ,
492
492
]
493
493
)
@@ -498,7 +498,7 @@ final class AttributeTests: XCTestCase {
498
498
func foo() {}
499
499
""" ,
500
500
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 " ] ) ,
502
502
DiagnosticSpec ( message: " unexpected code 'abc' in attribute " ) ,
503
503
]
504
504
)
0 commit comments