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

Specific test macro for each test file #378

Open
IshDeshpa opened this issue Dec 16, 2023 · 0 comments · May be fixed by #405
Open

Specific test macro for each test file #378

IshDeshpa opened this issue Dec 16, 2023 · 0 comments · May be fixed by #405
Labels
enhancement New feature or request

Comments

@IshDeshpa
Copy link
Contributor

Describe the problem this feature will solve
Right now, if we do ever want to include testing stuff in our main code (which I don't necessarily like in the first place), we can't conditionally compile it on anything other than the DEBUG macro or manually defined macros.

Describe the proposed solution
Basically, we can add a makefile step that adds a -DTEST_FILE_NAME to our gcc flags, so that the TEST_FILE_NAME macro is defined for any given test file. For example, if I were to run:
make leader TEST=StateMachine
a macro called TEST_STATE_MACHINE would be automatically defined for all compiled files.

Describe possible alternatives
This is a small enough thing to add to where if we decide later on that it's not useful we just don't have to condition anything on the macro.

Additional context
This would also be useful to add small things during the debugging process if necessary. It's just a quality of life thing.

@IshDeshpa IshDeshpa added the enhancement New feature or request label Dec 16, 2023
@KnockbackNemo KnockbackNemo linked a pull request Mar 2, 2024 that will close this issue
13 tasks
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

Successfully merging a pull request may close this issue.

1 participant