Skip to content

[5.9] assertMacroExpansion should assert if there are errors #1785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

bnbarham
Copy link
Contributor

  • Explanation: assertMacroExpansion is used for testing macro expansions. It should check that the expanded macro is itself valid.
  • Scope: Macro unit testing
  • Risk: Very low. It's possible some existing tests may now fail, but that means that the underlying expansion needs to be updated.
  • Original PR: assertMacroExpansion should assert if there are errors #1758

Invalid macro expansions should generate an assertion in
`assertMacroExpansion` rather than being ignored.

(cherry picked from commit ea2d7e4)
@bnbarham bnbarham requested a review from DougGregor June 14, 2023 16:32
@bnbarham bnbarham requested a review from ahoppen as a code owner June 14, 2023 16:32
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham
Copy link
Contributor Author

@swift-ci please test Windows platform

@bnbarham bnbarham merged commit be4a332 into swiftlang:release/5.9 Jun 15, 2023
@bnbarham bnbarham deleted the cherry-assert-on-macro-errors branch June 15, 2023 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants