Skip to content
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

Use fixit to convert function call in assertion macro #24

Open
swift-student opened this issue May 23, 2024 · 0 comments
Open

Use fixit to convert function call in assertion macro #24

swift-student opened this issue May 23, 2024 · 0 comments
Assignees

Comments

@swift-student
Copy link
Contributor

We can add a deprecated macro that takes a function call like #assertWasCalled(foo(paramOne: "Hello World")) and turns it into a reference to the function and the expected input like #assertWasCalled(foo(paramOne:), with: "Hello World"). We could technically support the former, but it is unclear that by passing the function call syntax into the macro, the function would not actually be called. So utilizing a DiagnosticMessage with a fixit will allow for typing the call in a way that feels natural, while maintaining clarity that we are asserting a function was called with a certain input and not actually calling it in the process of making that assertion.

@swift-student swift-student self-assigned this May 23, 2024
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

No branches or pull requests

1 participant