You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add a private assert helper: `assertSyntaxRemovingTestAttributes`
* Make `AttributeRemover` SPI (`@_spi(Testing)`)
* Rather than depending on `SyntaxNode`'s id-only `Equatable`
conformance, refactor `AttributeRemover` to remove attributes matching
a predicate: `AttributeRemover.init(removingWhere:)` of type
`(AttributeSyntax) -> Bool)`. This change allows `AttributeRemover` to
be used without first plucking the `AttributeSyntax` values to be
removed from a live tree.
Note: Unlike `assertMacroExpansion`, the new
`assertSyntaxRemovingTestAttributes` does not trim newlines before
comparing values. The trimming by `assertMacroExpansion` was masking a
(minor) bug in `AttributeRemover` where an extra leading newline remains
when the removed attribute has no proceeding tokens. For now, this
commit "fixes" the failing tests by including the unwanted leading
newlines in the expected test output, while also adding "FIXME" comments
to draw attention to the need for a future fix.
0 commit comments