Skip to content

Conversation

@sensenmann
Copy link
Owner

Motivation

  • Prevent regressions in EZLog string utilities and filter logic by adding unit tests for core helper functions.
  • Verify EZLog::split, EZLog::trim, and EZLog::formatNumber handle whitespace, delimiters and thousand separators correctly.
  • Ensure _shouldLog filtering works with LoggingConfig::customLoggingElements and overrideLogAll behavior.

Description

  • Add test file test/test_log_utils/test_log_utils.cpp with Unity tests covering EZLog::split, EZLog::trim, EZLog::formatNumber and _shouldLog scenarios.
  • Expose internals for testing by including EZLog.h with #define private public in the test file.
  • Add a PlatformIO test environment [env:esp32_test] to platformio.ini configured with test_framework = unity, test_filter = test_log_utils and test_build_project_src = true.

Testing

  • Attempted to run the test suite with pio test -e esp32_test, but the command failed because the pio executable is not available in the current environment.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants