This repository was archived by the owner on Feb 11, 2026. It is now read-only.
Removed MicrostrainTest assertions and set up standardized test registration interface - #165
Merged
Conversation
… main CMakeLists.txt file
…ed with redefinition fix
…aining_unit_tests
…te_microstrain_test
robbiefish
suggested changes
Oct 23, 2025
robbiefish
left a comment
Collaborator
There was a problem hiding this comment.
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
robbiefish
reviewed
Oct 23, 2025
| # 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") |
Collaborator
There was a problem hiding this comment.
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
robbiefish
approved these changes
Oct 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: