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_SpiSlaveTxByte (uint8_t arg1) |
void | SpiSlaveTxByte_fake (uint8_t input_byte) |
static RecordedCall * | Record_EnableSpiInterrupt (void) |
void | EnableSpiInterrupt_fake (void) |
static RecordedCall * | Record__SignalDataReady (void) |
void | _SignalDataReady_fake (void) |
static RecordedCall * | Record_DisableSpiInterrupt (void) |
void | DisableSpiInterrupt_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 SpiSlave_faked.c.
void _SignalDataReady_fake | ( | void | ) |
Fake records calls made by function under test.
Record:
Definition at line 84 of file SpiSlave_faked.c.
void DisableSpiInterrupt_fake | ( | void | ) |
Fake records calls made by function under test.
Record:
Definition at line 99 of file SpiSlave_faked.c.
void EnableSpiInterrupt_fake | ( | void | ) |
Fake records calls made by function under test.
Record:
Definition at line 69 of file SpiSlave_faked.c.
void SpiSlaveTxByte_fake | ( | uint8_t | input_byte | ) |
Fake records calls made by function under test.
Record:
Definition at line 53 of file SpiSlave_faked.c.