Skip to content

Commit f12ffc7

Browse files
committed
Update tests for diagnostic string change
1 parent 2646869 commit f12ffc7

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

Sources/SwiftSyntaxMacros/MacroProtocols/ExpressionMacro.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import SwiftSyntax
1414

1515
/// Describes a macro that is explicitly expanded as an expression.
1616
public protocol ExpressionMacro: FreestandingMacro {
17-
/// Expand a macro described by the given macro expansion expression
17+
/// Expand a macro described by the given freestanding macro expansion
1818
/// within the given context to produce a replacement expression.
1919
static func expansion<
2020
Node: FreestandingMacroExpansionSyntax,

Tests/SwiftParserTest/ExpressionTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ final class ExpressionTests: XCTestCase {
749749
"#keyPath((b:1️⃣)2️⃣",
750750
diagnostics: [
751751
DiagnosticSpec(locationMarker: "1️⃣", message: "expected value in tuple"),
752-
DiagnosticSpec(locationMarker: "2️⃣", message: "expected ')' to end macro expansion expression"),
752+
DiagnosticSpec(locationMarker: "2️⃣", message: "expected ')' to end macro expansion"),
753753
]
754754
)
755755
}

Tests/SwiftParserTest/translated/MultilinePoundDiagnosticArgRdar41154797Tests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ final class MultilinePoundDiagnosticArgRdar41154797Tests: XCTestCase {
2222
"""##,
2323
diagnostics: [
2424
DiagnosticSpec(message: #"expected '"""' to end string literal"#),
25-
DiagnosticSpec(message: "expected ')' to end macro expansion expression"),
25+
DiagnosticSpec(message: "expected ')' to end macro expansion"),
2626
]
2727
)
2828
}

Tests/SwiftParserTest/translated/ObjectLiteralsTests.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ final class ObjectLiteralsTests: XCTestCase {
2121
let _ = [#Color(colorLiteralRed: red, green: green, blue: blue, alpha: alpha)#1️⃣]
2222
""",
2323
diagnostics: [
24-
DiagnosticSpec(locationMarker: "1️⃣", message: "expected identifier in macro expansion expression")
24+
DiagnosticSpec(locationMarker: "1️⃣", message: "expected identifier in macro expansion")
2525
]
2626
)
2727
}
@@ -32,7 +32,7 @@ final class ObjectLiteralsTests: XCTestCase {
3232
let _ = [#Image(imageLiteral: localResourceNameAsString)#1️⃣]
3333
""",
3434
diagnostics: [
35-
DiagnosticSpec(locationMarker: "1️⃣", message: "expected identifier in macro expansion expression")
35+
DiagnosticSpec(locationMarker: "1️⃣", message: "expected identifier in macro expansion")
3636
]
3737
)
3838
}
@@ -43,7 +43,7 @@ final class ObjectLiteralsTests: XCTestCase {
4343
let _ = [#FileReference(fileReferenceLiteral: localResourceNameAsString)#1️⃣]
4444
""",
4545
diagnostics: [
46-
DiagnosticSpec(locationMarker: "1️⃣", message: "expected identifier in macro expansion expression")
46+
DiagnosticSpec(locationMarker: "1️⃣", message: "expected identifier in macro expansion")
4747
]
4848
)
4949
}
@@ -102,8 +102,8 @@ final class ObjectLiteralsTests: XCTestCase {
102102
let _ = [#1️⃣#2️⃣]
103103
""",
104104
diagnostics: [
105-
DiagnosticSpec(locationMarker: "1️⃣", message: "expected identifier in macro expansion expression"),
106-
DiagnosticSpec(locationMarker: "2️⃣", message: "expected identifier in macro expansion expression"),
105+
DiagnosticSpec(locationMarker: "1️⃣", message: "expected identifier in macro expansion"),
106+
DiagnosticSpec(locationMarker: "2️⃣", message: "expected identifier in macro expansion"),
107107
]
108108
)
109109
}
@@ -125,7 +125,7 @@ final class ObjectLiteralsTests: XCTestCase {
125125
let _ = [1️⃣#Color(red: 1, green: 1, blue: 1)#2️⃣3️⃣
126126
""",
127127
diagnostics: [
128-
DiagnosticSpec(locationMarker: "2️⃣", message: "expected identifier in macro expansion expression"),
128+
DiagnosticSpec(locationMarker: "2️⃣", message: "expected identifier in macro expansion"),
129129
DiagnosticSpec(locationMarker: "3️⃣", message: "expected ']' to end array"),
130130
]
131131
)
@@ -137,7 +137,7 @@ final class ObjectLiteralsTests: XCTestCase {
137137
let _ = [#Color(withRed: 1, green: 1, whatever: 2)#1️⃣]
138138
""",
139139
diagnostics: [
140-
DiagnosticSpec(locationMarker: "1️⃣", message: "expected identifier in macro expansion expression")
140+
DiagnosticSpec(locationMarker: "1️⃣", message: "expected identifier in macro expansion")
141141
]
142142
)
143143
}

Tests/SwiftParserTest/translated/PoundAssertTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ final class PoundAssertTests: XCTestCase {
4949
#assert(1️⃣, "error message")
5050
"""#,
5151
diagnostics: [
52-
DiagnosticSpec(message: "expected value in macro expansion expression")
52+
DiagnosticSpec(message: "expected value in macro expansion")
5353
]
5454
)
5555
}
@@ -63,7 +63,7 @@ final class PoundAssertTests: XCTestCase {
6363
""",
6464
diagnostics: [
6565
DiagnosticSpec(
66-
message: "expected ')' to end macro expansion expression",
66+
message: "expected ')' to end macro expansion",
6767
notes: [
6868
NoteSpec(message: "to match this opening '('")
6969
]
@@ -81,7 +81,7 @@ final class PoundAssertTests: XCTestCase {
8181
"""#,
8282
diagnostics: [
8383
DiagnosticSpec(
84-
message: "expected ')' to end macro expansion expression",
84+
message: "expected ')' to end macro expansion",
8585
notes: [
8686
NoteSpec(message: "to match this opening '('")
8787
]

0 commit comments

Comments
 (0)