HF-Core Platform 0.1.0-dev
Hardware-Agnostic Handler Layer & RTOS Utilities for HardFOC
Loading...
Searching...
No Matches
general_utils_comprehensive_test.cpp File Reference

Comprehensive test suite for hf-utils-general utilities. More...

#include "TestFramework.h"
#include "CircularBuffer.h"
#include "RingBuffer.h"
#include "AveragingFilter.h"
#include "CrcCalculator.h"
#include "ActionTimer.h"
#include "SoftwareVersion.h"
#include <cmath>
#include <cstring>
#include "esp_log.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
Include dependency graph for general_utils_comprehensive_test.cpp:

Functions

static bool test_circular_buffer_basic () noexcept
 
static bool test_circular_buffer_overflow () noexcept
 
static bool test_ring_buffer_basic () noexcept
 
static bool test_averaging_filter () noexcept
 
static bool test_averaging_filter_partial () noexcept
 
static bool test_crc_functions () noexcept
 
static bool test_action_timer () noexcept
 
static bool test_software_version () noexcept
 
void app_main (void)
 

Variables

static const char * TAG = "GeneralUtils_Test"
 
static TestResults g_test_results
 
static constexpr bool ENABLE_CIRCULAR_BUFFER_TESTS = true
 
static constexpr bool ENABLE_RING_BUFFER_TESTS = true
 
static constexpr bool ENABLE_AVERAGING_FILTER_TESTS = true
 
static constexpr bool ENABLE_CRC_TESTS = true
 
static constexpr bool ENABLE_TIMER_TESTS = true
 
static constexpr bool ENABLE_VERSION_TESTS = true
 

Detailed Description

Comprehensive test suite for hf-utils-general utilities.

Tests: CircularBuffer, RingBuffer, AveragingFilter, CRC utilities, ActionTimer, and SoftwareVersion.

These are all header-only, platform-independent utilities — they run on ESP32 FreeRTOS but do not require any peripherals.

Author
HardFOC Team
Date
2025-2026

Function Documentation

◆ app_main()

void app_main ( void )
Here is the call graph for this function:

◆ test_action_timer()

static bool test_action_timer ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_averaging_filter()

static bool test_averaging_filter ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_averaging_filter_partial()

static bool test_averaging_filter_partial ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_circular_buffer_basic()

static bool test_circular_buffer_basic ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_circular_buffer_overflow()

static bool test_circular_buffer_overflow ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_crc_functions()

static bool test_crc_functions ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_ring_buffer_basic()

static bool test_ring_buffer_basic ( )
staticnoexcept
Here is the caller graph for this function:

◆ test_software_version()

static bool test_software_version ( )
staticnoexcept
Here is the caller graph for this function:

Variable Documentation

◆ ENABLE_AVERAGING_FILTER_TESTS

constexpr bool ENABLE_AVERAGING_FILTER_TESTS = true
staticconstexpr

◆ ENABLE_CIRCULAR_BUFFER_TESTS

constexpr bool ENABLE_CIRCULAR_BUFFER_TESTS = true
staticconstexpr

◆ ENABLE_CRC_TESTS

constexpr bool ENABLE_CRC_TESTS = true
staticconstexpr

◆ ENABLE_RING_BUFFER_TESTS

constexpr bool ENABLE_RING_BUFFER_TESTS = true
staticconstexpr

◆ ENABLE_TIMER_TESTS

constexpr bool ENABLE_TIMER_TESTS = true
staticconstexpr

◆ ENABLE_VERSION_TESTS

constexpr bool ENABLE_VERSION_TESTS = true
staticconstexpr

◆ g_test_results

TestResults g_test_results
static

◆ TAG

const char* TAG = "GeneralUtils_Test"
static