|
HardFOC Core
API reference
|
In-memory BaseNvs fake with fault injection, for host tests. More...
#include "base/BaseNvs.h"#include <cstdint>#include <map>#include <string>#include <vector>Go to the source code of this file.
Classes | |
| class | hf::host::MockNvs |
| struct | hf::host::MockNvs::Entry |
Namespaces | |
| namespace | hf |
| namespace | hf::host |
In-memory BaseNvs fake with fault injection, for host tests.
Values live in memory, typed (u32, string, blob) like ESP-IDF NVS: reading a key as a different type returns NVS_ERR_KEY_NOT_FOUND. Writes are visible at once; Commit() only counts calls, so a test can check that the code under test commits. FailNext() makes the next N operations fail; SetReadOnly() makes every write fail with NVS_ERR_READ_ONLY.