HF Interface Wrapper 0.1.0-dev
Embedded C++ hardware abstraction layer
Loading...
Searching...
No Matches
LoggerComprehensiveTest.cpp File Reference

Comprehensive Logger testing suite for ESP32-C6 DevKit-M-1 (noexcept) More...

#include "TestFramework.h"
#include "base/BaseLogger.h"
#include "mcu/esp32/EspLogger.h"
#include "utils/memory_utils.h"
#include <string>
Include dependency graph for LoggerComprehensiveTest.cpp:

Functions

bool test_logger_construction () noexcept
 
bool test_logger_initialization () noexcept
 
bool test_logger_basic_logging () noexcept
 
bool test_logger_level_management () noexcept
 
bool test_logger_formatted_logging () noexcept
 
bool test_logger_log_v2_features () noexcept
 
bool test_logger_buffer_logging () noexcept
 
bool test_logger_location_logging () noexcept
 
bool test_logger_statistics_diagnostics () noexcept
 
bool test_logger_health_monitoring () noexcept
 
bool test_logger_error_handling () noexcept
 
bool test_logger_performance_testing () noexcept
 
bool test_logger_utility_functions () noexcept
 
bool test_logger_cleanup () noexcept
 
hf_logger_config_t create_test_config () noexcept
 
bool verify_logger_state (EspLogger &logger, bool should_be_initialized) noexcept
 
void log_performance_metrics (const char *test_name, hf_u64_t start_time, hf_u32_t operations) noexcept
 
void app_main (void)
 

Variables

static const char * TAG = "EspLOGGER_Test"
 
static TestResults g_test_results
 
static constexpr hf_u32_t TEST_MAX_MESSAGE_LENGTH = 512
 
static constexpr hf_u32_t TEST_BUFFER_SIZE = 1024
 
static const char * TEST_TAG = "TEST_TAG"
 
static std::unique_ptr< EspLogger > g_logger_instance = nullptr
 
static constexpr bool ENABLE_CORE_TESTS = true
 
static constexpr bool ENABLE_LEVEL_TESTS = true
 
static constexpr bool ENABLE_FEATURE_TESTS
 
static constexpr bool ENABLE_DIAGNOSTIC_TESTS = true
 
static constexpr bool ENABLE_STRESS_TESTS
 

Detailed Description

Comprehensive Logger testing suite for ESP32-C6 DevKit-M-1 (noexcept)

This file contains a dedicated, comprehensive test suite for the EspLogger class targeting ESP32-C6 with ESP-IDF v5.5+. It provides thorough testing of all logging functionalities including basic operations, level management, statistics, diagnostics, buffer logging, and ESP-IDF Log V2 features.

All functions are noexcept - no exception handling used.

Author
Nebiyu Tadesse
Date
2025

Function Documentation

◆ app_main()

void app_main ( void )

◆ create_test_config()

hf_logger_config_t create_test_config ( )
noexcept

◆ log_performance_metrics()

void log_performance_metrics ( const char * test_name,
hf_u64_t start_time,
hf_u32_t operations )
noexcept

◆ test_logger_basic_logging()

bool test_logger_basic_logging ( )
noexcept

◆ test_logger_buffer_logging()

bool test_logger_buffer_logging ( )
noexcept

◆ test_logger_cleanup()

bool test_logger_cleanup ( )
noexcept

◆ test_logger_construction()

bool test_logger_construction ( )
noexcept

◆ test_logger_error_handling()

bool test_logger_error_handling ( )
noexcept

◆ test_logger_formatted_logging()

bool test_logger_formatted_logging ( )
noexcept

◆ test_logger_health_monitoring()

bool test_logger_health_monitoring ( )
noexcept

◆ test_logger_initialization()

bool test_logger_initialization ( )
noexcept

◆ test_logger_level_management()

bool test_logger_level_management ( )
noexcept

◆ test_logger_location_logging()

bool test_logger_location_logging ( )
noexcept

◆ test_logger_log_v2_features()

bool test_logger_log_v2_features ( )
noexcept

◆ test_logger_performance_testing()

bool test_logger_performance_testing ( )
noexcept

◆ test_logger_statistics_diagnostics()

bool test_logger_statistics_diagnostics ( )
noexcept

◆ test_logger_utility_functions()

bool test_logger_utility_functions ( )
noexcept

◆ verify_logger_state()

bool verify_logger_state ( EspLogger & logger,
bool should_be_initialized )
noexcept

Variable Documentation

◆ ENABLE_CORE_TESTS

constexpr bool ENABLE_CORE_TESTS = true
staticconstexpr

◆ ENABLE_DIAGNOSTIC_TESTS

constexpr bool ENABLE_DIAGNOSTIC_TESTS = true
staticconstexpr

◆ ENABLE_FEATURE_TESTS

constexpr bool ENABLE_FEATURE_TESTS
staticconstexpr
Initial value:
=
true

◆ ENABLE_LEVEL_TESTS

constexpr bool ENABLE_LEVEL_TESTS = true
staticconstexpr

◆ ENABLE_STRESS_TESTS

constexpr bool ENABLE_STRESS_TESTS
staticconstexpr
Initial value:
=
true

◆ g_logger_instance

std::unique_ptr<EspLogger> g_logger_instance = nullptr
static

◆ g_test_results

TestResults g_test_results
static

◆ TAG

const char* TAG = "EspLOGGER_Test"
static

◆ TEST_BUFFER_SIZE

constexpr hf_u32_t TEST_BUFFER_SIZE = 1024
staticconstexpr

◆ TEST_MAX_MESSAGE_LENGTH

constexpr hf_u32_t TEST_MAX_MESSAGE_LENGTH = 512
staticconstexpr

◆ TEST_TAG

const char* TEST_TAG = "TEST_TAG"
static