firmware  v0.1.2
Chromation Spectrometer Dev-Kit
Functions
Spi_faked.c File Reference

Faked calls record themselves in mock. More...

#include "Mock.h"
#include "ReadWriteBits.h"
#include "Spi_faked.h"
#include "Spi.h"

Go to the source code of this file.

Functions

static RecordedCallRecord__SpiTransferIsDone (void)
 
bool _SpiTransferIsDone_fake (void)
 
static RecordedCallRecord_ClearSpiInterruptFlag (void)
 
void ClearSpiInterruptFlag_fake (void)
 

Detailed Description

Faked calls record themselves in mock.


Tests access mock to see what the function under test does:

Definition in file Spi_faked.c.

Function Documentation

◆ _SpiTransferIsDone_fake()

bool _SpiTransferIsDone_fake ( void  )

Fake records calls made by function under test.

Record:

  • call name

Fake sets SPI Interrupt Flag bit in SPI Status Register.

Fake always returns true:

  • Prevents test suite from hanging forever.

Definition at line 48 of file Spi_faked.c.

◆ ClearSpiInterruptFlag_fake()

void ClearSpiInterruptFlag_fake ( void  )

Fake records calls made by function under test.

Record:

  • call name

Definition at line 70 of file Spi_faked.c.