-
Notifications
You must be signed in to change notification settings - Fork 19
Removed MicrostrainTest assertions and set up standardized test registration interface #165
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
Conversation
… main CMakeLists.txt file
…ed with redefinition fix
…aining_unit_tests
…te_microstrain_test
robbiefish
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good for the most part, but I would change to use a template file for the C auto discovery instead of generating the entire file in CMake
| # Escape backslashes in filepaths for C string literal | ||
| string(REPLACE "\\" "\\\\" TEST_FILEPATH_ESCAPED "${TEST_FILEPATH}") | ||
|
|
||
| string(APPEND TEST_FILTERING " if (!test_filter || strcmp(test_filter, \"[${SUITE_NAME}] ${TEST_NAME}\") == 0) {\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like this functionality could live in another macro that wraps the INTERNAL_RUN_MICROSTRAIN_TEST_CASE_AUTO_DISCOVER so that you are only appending one line of code to the file. I think the multiline nature of this code generation is what makes it difficult to read
Merge this PR first: #164
This PR completely revamps MicrostrainTest, making it more a framework for managing test framework dependencies and test registration and discovery, as well as common wrapper code and utility assertions for any framework.
It adds: