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

Automatic Mock Generator #409

Open
KnockbackNemo opened this issue Jan 20, 2024 · 0 comments
Open

Automatic Mock Generator #409

KnockbackNemo opened this issue Jan 20, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@KnockbackNemo
Copy link
Contributor

Describe the problem this feature will solve
When we unit test, we want to check a single source file / function for issues by eliminating all dependencies. This is done by writing simple "mock" functions which are simple, known to work, and help us collect data about the code being tested. We use macros from Fake Function Framework to make mock-writing more convenient, but we still have to write out macros for all the functions we want mocked. This can be tedious and also means our mock files will quickly become outdated any time our code changes.

Describe the proposed solution
We could solve this problem by integrating an automatic mock generator which will use our header files to create mocks for us. Code for this already exists here https://github.com/ChiefGokhlayeh/autofff

Describe possible alternatives
Another alternative is to write our own script. The start of one has been written here, but it would still need to be improved and integrated into the workspace.

@KnockbackNemo KnockbackNemo added the enhancement New feature or request label Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant