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

Investigate automatically creating Fakes. #1

Open
younata opened this issue Mar 29, 2024 · 1 comment
Open

Investigate automatically creating Fakes. #1

younata opened this issue Mar 29, 2024 · 1 comment
Milestone

Comments

@younata
Copy link
Member

younata commented Mar 29, 2024

Handrolling fakes is a pain. It would be awesome to be able to write:

@AutoFake final class FakeThing: Thing {}

and have Swift just... generate the thing for us!

This probably isn't as simple as I'd like it to be, sadly.

@younata
Copy link
Member Author

younata commented Apr 10, 2024

This seems possible using members macro, and the syntax would look like:

@FakeFor(Thing.self)
final class FakeThing {}

But I have a very poor understanding of actually working with swift-syntax to write a macro. So, this is on hold until I find more time to go through and figure all this out.

@younata younata added this to the 1.0 milestone Apr 24, 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