feat: Add comprehensive unit tests and CI workflow #38
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.
This commit introduces a suite of unit tests for the microlog library and integrates them into the CI pipeline.
New unit tests cover:
ulog_set_level), and quiet mode (ulog_set_quiet).ulog_event_to_cstr, including configurable features like time, file string, short/emoji levels.ulog_set_prefix_fn) whenULOG_CUSTOM_PREFIX_SIZEis defined.ulog_add_callback,ulog_add_fp) whenULOG_EXTRA_OUTPUTSis defined.ULOG_TOPICS_NUM).ulog_set_lock).CTest is used as the testing framework, and tests are defined in the
tests/unitdirectory. CMakeLists.txt files have been updated to build these tests, using compile definitions to test different feature configurations.A new GitHub Actions workflow (
.github/workflows/unit-tests.yml) has been added to automatically build the project and run these unit tests on every push and pull request to the main branch. This will help ensure code quality and prevent regressions.