File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed
Sources/SwiftSyntaxMacrosTestSupport
Tests/SwiftSyntaxMacrosTest Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -275,8 +275,12 @@ public func assertMacroExpansion(
275
275
let expandedSourceFile = origSourceFile. expand ( macros: macros, in: context) . formatted ( using: BasicFormat ( indentationWidth: indentationWidth) )
276
276
277
277
assertStringsEqualWithDiff (
278
- expandedSourceFile. description,
279
- expandedSource,
278
+ expandedSourceFile. description. trimmingCharacters ( in: . newlines) ,
279
+ expandedSource. trimmingCharacters ( in: . newlines) ,
280
+ additionalInfo: """
281
+ Actual expanded source:
282
+ \( expandedSource)
283
+ """ ,
280
284
file: file,
281
285
line: line
282
286
)
Original file line number Diff line number Diff line change @@ -807,7 +807,6 @@ final class MacroSystemTests: XCTestCase {
807
807
}
808
808
""" ,
809
809
expandedSource: """
810
-
811
810
struct X {
812
811
func f() {
813
812
}
@@ -831,7 +830,6 @@ final class MacroSystemTests: XCTestCase {
831
830
#bitwidthNumberedStructs( " MyInt " )
832
831
""" ,
833
832
expandedSource: """
834
-
835
833
struct MyInt8 {
836
834
}
837
835
struct MyInt16 {
@@ -853,7 +851,6 @@ final class MacroSystemTests: XCTestCase {
853
851
var x: Int
854
852
""" ,
855
853
expandedSource: """
856
-
857
854
var x: Int {
858
855
get {
859
856
_x.wrappedValue
@@ -876,7 +873,6 @@ final class MacroSystemTests: XCTestCase {
876
873
func f(a: Int, for b: String, _ value: Double) async -> String { }
877
874
""" ,
878
875
expandedSource: """
879
-
880
876
func f(a: Int, for b: String, _ value: Double) async -> String {
881
877
}
882
878
@@ -900,7 +896,6 @@ final class MacroSystemTests: XCTestCase {
900
896
}
901
897
""" ,
902
898
expandedSource: """
903
-
904
899
struct S {
905
900
var value: Int
906
901
var _storage: Storage<Self>
@@ -928,7 +923,6 @@ final class MacroSystemTests: XCTestCase {
928
923
}
929
924
""" ,
930
925
expandedSource: """
931
-
932
926
struct Point {
933
927
@Wrapper
934
928
var x: Int
@@ -973,7 +967,6 @@ final class MacroSystemTests: XCTestCase {
973
967
}
974
968
""" ,
975
969
expandedSource: """
976
-
977
970
struct Point {
978
971
@Wrapper
979
972
var x: Int
You can’t perform that action at this time.
0 commit comments