firmware
v0.1.2
Chromation Spectrometer Dev-Kit
|
Faked calls record themselves in mock
.
More...
Go to the source code of this file.
Functions | |
static RecordedCall * | Record__SpiTransferIsDone (void) |
bool | _SpiTransferIsDone_fake (void) |
static RecordedCall * | Record_ClearSpiInterruptFlag (void) |
void | ClearSpiInterruptFlag_fake (void) |
Faked calls record themselves in mock
.
Tests access mock
to see what the function under test does:
TestSuite.exe
seg faults if any test accesses mock
without defining mock
.Mock.h
declares mock
:mock
is a global that is defined in test_runner
: mock
is allocated and deallocated in the setup/teardown for each test that calls the faked
call.mock
for an entire test suite by pointing setUp
and tearDown
in the test_runner
:test
with mock
defined:Definition in file Spi_faked.c.
bool _SpiTransferIsDone_fake | ( | void | ) |
Fake records calls made by function under test.
Record:
Fake sets SPI Interrupt Flag bit in SPI Status Register.
Fake always returns true:
Definition at line 48 of file Spi_faked.c.
void ClearSpiInterruptFlag_fake | ( | void | ) |
Fake records calls made by function under test.
Record:
Definition at line 70 of file Spi_faked.c.