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 @@ -282,8 +282,12 @@ public func assertMacroExpansion(
282
282
let expandedSourceFile = origSourceFile. expand ( macros: macros, in: context) . formatted ( using: BasicFormat ( indentationWidth: indentationWidth) )
283
283
284
284
assertStringsEqualWithDiff (
285
- expandedSourceFile. description. trimmingTrailingWhitespace ( ) ,
286
- expandedSource. trimmingTrailingWhitespace ( ) ,
285
+ expandedSourceFile. description. trimmingTrailingWhitespace ( ) . trimmingCharacters ( in: . newlines) ,
286
+ expandedSource. trimmingTrailingWhitespace ( ) . trimmingCharacters ( in: . newlines) ,
287
+ additionalInfo: """
288
+ Actual expanded source:
289
+ \( expandedSource)
290
+ """ ,
287
291
file: file,
288
292
line: line
289
293
)
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