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

Comprehensive NVS (Non-Volatile Storage) testing suite for ESP32-C6 DevKit-M-1 (noexcept) More...

#include "TestFramework.h"
#include "base/BaseNvs.h"
#include "mcu/esp32/EspNvs.h"
#include <cstdio>
#include <cstring>
#include <random>
Include dependency graph for NvsComprehensiveTest.cpp:

Functions

bool test_nvs_initialization () noexcept
 
bool test_nvs_u32_operations () noexcept
 
bool test_nvs_string_operations () noexcept
 
bool test_nvs_blob_operations () noexcept
 
bool test_nvs_key_operations () noexcept
 
bool test_nvs_commit_operations () noexcept
 
bool test_nvs_statistics_diagnostics () noexcept
 
bool test_nvs_metadata () noexcept
 
bool test_nvs_edge_cases () noexcept
 
bool test_nvs_stress () noexcept
 
void app_main (void)
 

Variables

static const char * TAG = "NVS_Test"
 
static TestResults g_test_results
 
static constexpr size_t TEST_BUFFER_SIZE = 128
 
static constexpr size_t LARGE_BUFFER_SIZE = 1024
 
static constexpr hf_u32_t TEST_U32_VALUE = 0xDEADBEEF
 
static constexpr hf_u32_t TEST_U32_MAX = 0xFFFFFFFF
 
static constexpr hf_u32_t TEST_U32_MIN = 0x00000000
 
static const char * TEST_STRING = "Hello, ESP32-C6 NVS!"
 
static const char * LONG_STRING = "This is a test string for NVS storage."
 
static const uint8_t TEST_BLOB_DATA [] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}
 
static constexpr bool ENABLE_CORE_TESTS
 
static constexpr bool ENABLE_DATA_TESTS = true
 
static constexpr bool ENABLE_MANAGEMENT_TESTS = true
 
static constexpr bool ENABLE_DIAGNOSTIC_TESTS = true
 
static constexpr bool ENABLE_STRESS_TESTS = true
 

Detailed Description

Comprehensive NVS (Non-Volatile Storage) testing suite for ESP32-C6 DevKit-M-1 (noexcept)

This test suite provides full coverage of the EspNvs class, testing all methods, error conditions, edge cases, and boundary conditions. The tests are designed to run without exceptions and without RTTI.

Author
Test Suite
Date
2025

Function Documentation

◆ app_main()

void app_main ( void )

◆ test_nvs_blob_operations()

bool test_nvs_blob_operations ( )
noexcept

◆ test_nvs_commit_operations()

bool test_nvs_commit_operations ( )
noexcept

◆ test_nvs_edge_cases()

bool test_nvs_edge_cases ( )
noexcept

◆ test_nvs_initialization()

bool test_nvs_initialization ( )
noexcept

◆ test_nvs_key_operations()

bool test_nvs_key_operations ( )
noexcept

◆ test_nvs_metadata()

bool test_nvs_metadata ( )
noexcept

◆ test_nvs_statistics_diagnostics()

bool test_nvs_statistics_diagnostics ( )
noexcept

◆ test_nvs_stress()

bool test_nvs_stress ( )
noexcept

◆ test_nvs_string_operations()

bool test_nvs_string_operations ( )
noexcept

◆ test_nvs_u32_operations()

bool test_nvs_u32_operations ( )
noexcept

Variable Documentation

◆ ENABLE_CORE_TESTS

constexpr bool ENABLE_CORE_TESTS
staticconstexpr
Initial value:
=
true

◆ ENABLE_DATA_TESTS

constexpr bool ENABLE_DATA_TESTS = true
staticconstexpr

◆ ENABLE_DIAGNOSTIC_TESTS

constexpr bool ENABLE_DIAGNOSTIC_TESTS = true
staticconstexpr

◆ ENABLE_MANAGEMENT_TESTS

constexpr bool ENABLE_MANAGEMENT_TESTS = true
staticconstexpr

◆ ENABLE_STRESS_TESTS

constexpr bool ENABLE_STRESS_TESTS = true
staticconstexpr

◆ g_test_results

TestResults g_test_results
static

◆ LARGE_BUFFER_SIZE

constexpr size_t LARGE_BUFFER_SIZE = 1024
staticconstexpr

◆ LONG_STRING

const char* LONG_STRING = "This is a test string for NVS storage."
static

◆ TAG

const char* TAG = "NVS_Test"
static

◆ TEST_BLOB_DATA

const uint8_t TEST_BLOB_DATA[] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}
static

◆ TEST_BUFFER_SIZE

constexpr size_t TEST_BUFFER_SIZE = 128
staticconstexpr

◆ TEST_STRING

const char* TEST_STRING = "Hello, ESP32-C6 NVS!"
static

◆ TEST_U32_MAX

constexpr hf_u32_t TEST_U32_MAX = 0xFFFFFFFF
staticconstexpr

◆ TEST_U32_MIN

constexpr hf_u32_t TEST_U32_MIN = 0x00000000
staticconstexpr

◆ TEST_U32_VALUE

constexpr hf_u32_t TEST_U32_VALUE = 0xDEADBEEF
staticconstexpr