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

Add checks to ensure test and section names do not clobber already defined units #89

Closed
AutonomicPerfectionist opened this issue Aug 29, 2023 · 1 comment · Fixed by #94
Labels
enhancement New feature or request

Comments

@AutonomicPerfectionist
Copy link
Contributor

Is your feature request related to a problem? Please describe.
When adding new tests, it's common to copy the definition of a previous test and modify the contents. However, sometimes the test writer forgets to change the name of the new section or test, and it overwrites the old test definition.

Describe the solution you'd like
Inside ct_add_section, we can do a quick check to see if the given name is already a section in the parent unit.

Alternatively, we could do a cpp_type_of() to check if the function with that name is already defined, this would additionally catch any errors with the weird scoping rules.

@AutonomicPerfectionist AutonomicPerfectionist added the enhancement New feature or request label Aug 29, 2023
@AutonomicPerfectionist
Copy link
Contributor Author

After #91 this is less of an issue, but we can still do verification in ct_add_section by checking the sibling sections' names

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