Closed ajkolean closed 6 months ago
Awesome, thanks for the PR! Just a few requested changes (mostly to do with the literal parsing tests)
Updated. Yeah I wasn't sure about the TODO that was there. Seems like the best way to test that is actual patterns that would fail/pass the literal being passed. It might be possible to rebuild the pattern through reflection and assert on that. But that's usually brittle and the syntax tree is pretty gnarly.
This PR replaces
SwiftSyntaxMacrosTestSupport
withswift-macro-testing
. It streamlines the macro testing process by introducing automated fixmes and better diagnostics.Key changes include:
swift-macro-testing
.Additionally, this implementation demonstrates use of inline snapshotting tests, a technique used under the hood by the macro testing framework to verify the correctness of outputs directly within test cases. This approach can improve both the readability and accuracy of the tests.
Resolves #6
Benefits: