Trying to find more descriptive names for mocking macros

This commit is contained in:
Attila Body 2019-11-28 07:06:09 +01:00
parent c574fdbe82
commit 17b146c018
2 changed files with 16 additions and 16 deletions

View file

@ -7,14 +7,14 @@
#include <f4ll_c/dmahelper.h>
#ifdef UNITTEST
MOCKME_IMPL(volatile uint32_t*, Dma_GetIsReg, DMA_TypeDef*, uint32_t)
MOCKME_IMPL(volatile uint32_t*, Dma_GetIfcReg, DMA_TypeDef*, uint32_t)
MOCKME_IMPL(uint32_t, Dma_GetDmeMask, uint32_t)
MOCKME_IMPL(uint32_t, Dma_GetTeMask, uint32_t)
MOCKME_IMPL(uint32_t, Dma_GetHtMask, uint32_t)
MOCKME_IMPL(uint32_t, Dma_GetTcMask, uint32_t)
MOCKME_IMPL(uint32_t, Dma_GetFeMask, uint32_t)
MOCKME_IMPL(void, Dma_Init, struct dmainfo_t*, DMA_TypeDef*, uint32_t)
DEFINE_MOCKPTR(volatile uint32_t*, Dma_GetIsReg, DMA_TypeDef*, uint32_t)
DEFINE_MOCKPTR(volatile uint32_t*, Dma_GetIfcReg, DMA_TypeDef*, uint32_t)
DEFINE_MOCKPTR(uint32_t, Dma_GetDmeMask, uint32_t)
DEFINE_MOCKPTR(uint32_t, Dma_GetTeMask, uint32_t)
DEFINE_MOCKPTR(uint32_t, Dma_GetHtMask, uint32_t)
DEFINE_MOCKPTR(uint32_t, Dma_GetTcMask, uint32_t)
DEFINE_MOCKPTR(uint32_t, Dma_GetFeMask, uint32_t)
DEFINE_MOCKPTR(void, Dma_Init, struct dmainfo_t*, DMA_TypeDef*, uint32_t)
#define Dma_GetIsReg(...) Dma_GetIsReg_(__VA_ARGS__)
#define Dma_GetIfcReg(...) Dma_GetIfcReg_(__VA_ARGS__)

View file

@ -28,14 +28,14 @@ struct dmainfo_t {
//>>>>>>>>>> MOCK <<<<<<<<<<
#ifdef UNITTEST
MOCKME_PREP(volatile uint32_t*, Dma_GetIsReg, DMA_TypeDef*, uint32_t)
MOCKME_PREP(volatile uint32_t*, Dma_GetIfcReg, DMA_TypeDef*, uint32_t)
MOCKME_PREP(uint32_t, Dma_GetDmeMask, uint32_t)
MOCKME_PREP(uint32_t, Dma_GetTeMask, uint32_t)
MOCKME_PREP(uint32_t, Dma_GetHtMask, uint32_t)
MOCKME_PREP(uint32_t, Dma_GetTcMask, uint32_t)
MOCKME_PREP(uint32_t, Dma_GetFeMask, uint32_t)
MOCKME_PREP(void, Dma_Init, struct dmainfo_t*, DMA_TypeDef*, uint32_t)
DECLARE_MOCKPTR(volatile uint32_t*, Dma_GetIsReg, DMA_TypeDef*, uint32_t)
DECLARE_MOCKPTR(volatile uint32_t*, Dma_GetIfcReg, DMA_TypeDef*, uint32_t)
DECLARE_MOCKPTR(uint32_t, Dma_GetDmeMask, uint32_t)
DECLARE_MOCKPTR(uint32_t, Dma_GetTeMask, uint32_t)
DECLARE_MOCKPTR(uint32_t, Dma_GetHtMask, uint32_t)
DECLARE_MOCKPTR(uint32_t, Dma_GetTcMask, uint32_t)
DECLARE_MOCKPTR(uint32_t, Dma_GetFeMask, uint32_t)
DECLARE_MOCKPTR(void, Dma_Init, struct dmainfo_t*, DMA_TypeDef*, uint32_t)
#define Dma_GetIsReg(...) Dma_GetIsReg_(__VA_ARGS__)
#define Dma_GetIfcReg(...) Dma_GetIfcReg_(__VA_ARGS__)