Test fixture class for testing the EEPROM emulation.
More...
#include <EEPROMEmuTest.hxx>
|
| void | create (bool clear=true) |
| | Creates the eeprom under test.
|
| |
| void | write_to (unsigned ofs, const string &payload) |
| | Helper function to write to the test eeprom.
|
| |
| EEPROM * | ee () |
| |
| string | block_data (unsigned block_number) |
| |
| void | overflow_block () |
| | Write enough much data to the eepromemu under test to overflow the current block.
|
| |
| uint32_t | block_address (unsigned block_number) |
| |
|
| static constexpr unsigned | eeprom_size = 1000 |
| | test eeprom size
|
| |
Test fixture class for testing the EEPROM emulation.
Definition at line 144 of file EEPROMEmuTest.hxx.
◆ block_address()
| uint32_t EepromTest::block_address |
( |
unsigned |
block_number | ) |
|
|
inlineprotected |
- Returns
- the address (that is, the file offset) of the payload stored in a given block.
- Parameters
-
| block_number | is the index of the block in question (0.. block count - 1). |
Definition at line 194 of file EEPROMEmuTest.hxx.
◆ block_data()
| string EepromTest::block_data |
( |
unsigned |
block_number | ) |
|
|
inlineprotected |
- Returns
- the data payload in a given block.
- Parameters
-
| block_number | which block's data to return |
Definition at line 169 of file EEPROMEmuTest.hxx.
◆ create()
| void EepromTest::create |
( |
bool |
clear = true | ) |
|
|
inlineprotected |
Creates the eeprom under test.
- Parameters
-
| clear | if true, eeprom starts up empty. |
Definition at line 148 of file EEPROMEmuTest.hxx.
◆ ee()
◆ overflow_block()
| void EepromTest::overflow_block |
( |
| ) |
|
|
inlineprotected |
Write enough much data to the eepromemu under test to overflow the current block.
Definition at line 181 of file EEPROMEmuTest.hxx.
◆ write_to()
| void EepromTest::write_to |
( |
unsigned |
ofs, |
|
|
const string & |
payload |
|
) |
| |
|
inlineprotected |
Helper function to write to the test eeprom.
- Parameters
-
| ofs | where to write |
| payload | what to write |
Definition at line 157 of file EEPROMEmuTest.hxx.
◆ eeprom_size
| constexpr unsigned EepromTest::eeprom_size = 1000 |
|
staticconstexprprotected |
The documentation for this class was generated from the following file: