Skip to content

Commit 178dc7a

Browse files
committed
Address review comments
1 parent beb322f commit 178dc7a

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

Sources/SwiftSyntaxMacrosTestSupport/Assertions.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ public func assertMacroExpansion(
7070
fixedSource: expectedFixedSource,
7171
testModuleName: testModuleName,
7272
testFileName: testFileName,
73-
indentationWidth: indentationWidth
73+
indentationWidth: indentationWidth,
74+
file: file,
75+
line: line
7476
)
7577
}
7678

Sources/SwiftSyntaxMacrosTestSupportFrameworkAgnostic/Assertions.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ public struct TestFailureLocation {
7373
}
7474
}
7575

76-
/// Defines the details of a test failure, consisting of a message and the location at which the l
76+
/// Defines the details of a test failure, consisting of a message and the location at which the test failure should be
77+
/// shown.
7778
public struct TestFailureSpec {
7879
public let message: String
7980
public let location: TestFailureLocation
@@ -502,8 +503,8 @@ public func assertMacroExpansion(
502503
}
503504

504505
assertStringsEqualWithDiff(
505-
expandedSourceFile.description.droppingLast(while: \.isNewline),
506-
expectedExpandedSource.droppingLast(while: \.isNewline),
506+
expandedSourceFile.description.drop(while: \.isNewline).droppingLast(while: \.isNewline),
507+
expectedExpandedSource.drop(while: \.isNewline).droppingLast(while: \.isNewline),
507508
"Macro expansion did not produce the expected expanded source",
508509
additionalInfo: """
509510
Actual expanded source:

Sources/_SwiftSyntaxTestSupportFrameworkAgnostic/AssertEqualWithDiff.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ public struct TestFailureLocation {
3131
}
3232
}
3333

34-
/// Defines the details of a test failure, consisting of a message and the location at which the l
34+
/// Defines the details of a test failure, consisting of a message and the location at which the test failure should be
35+
/// shown.
3536
public struct TestFailureSpec {
3637
public let message: String
3738
public let location: TestFailureLocation

Sources/_SwiftSyntaxTestSupportFrameworkAgnostic/String+TrimmingTrailingWhitespace.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
extension String {
14-
// This implementation is really slow; to use it outside a test it should be optimized.
1514
public func trimmingTrailingWhitespace() -> String {
1615
return
1716
self

Tests/SwiftParserTest/translated/RecoveryTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2454,7 +2454,7 @@ final class RecoveryTests: ParserTestCase {
24542454
DiagnosticSpec(message: "unexpected code '!=baz' in parameter clause"),
24552455
],
24562456
fixedSource: """
2457-
func foo1(bar: <#type#>!=baz) {}
2457+
func foo1(bar: <#type#>!=baz) {}
24582458
"""
24592459
)
24602460
}

0 commit comments

Comments
 (0)