Trying to find more descriptive names for mocking macros
This commit is contained in:
parent
c574fdbe82
commit
17b146c018
2 changed files with 16 additions and 16 deletions
16
dmahelper.c
16
dmahelper.c
|
@ -7,14 +7,14 @@
|
||||||
#include <f4ll_c/dmahelper.h>
|
#include <f4ll_c/dmahelper.h>
|
||||||
|
|
||||||
#ifdef UNITTEST
|
#ifdef UNITTEST
|
||||||
MOCKME_IMPL(volatile uint32_t*, Dma_GetIsReg, DMA_TypeDef*, uint32_t)
|
DEFINE_MOCKPTR(volatile uint32_t*, Dma_GetIsReg, DMA_TypeDef*, uint32_t)
|
||||||
MOCKME_IMPL(volatile uint32_t*, Dma_GetIfcReg, DMA_TypeDef*, uint32_t)
|
DEFINE_MOCKPTR(volatile uint32_t*, Dma_GetIfcReg, DMA_TypeDef*, uint32_t)
|
||||||
MOCKME_IMPL(uint32_t, Dma_GetDmeMask, uint32_t)
|
DEFINE_MOCKPTR(uint32_t, Dma_GetDmeMask, uint32_t)
|
||||||
MOCKME_IMPL(uint32_t, Dma_GetTeMask, uint32_t)
|
DEFINE_MOCKPTR(uint32_t, Dma_GetTeMask, uint32_t)
|
||||||
MOCKME_IMPL(uint32_t, Dma_GetHtMask, uint32_t)
|
DEFINE_MOCKPTR(uint32_t, Dma_GetHtMask, uint32_t)
|
||||||
MOCKME_IMPL(uint32_t, Dma_GetTcMask, uint32_t)
|
DEFINE_MOCKPTR(uint32_t, Dma_GetTcMask, uint32_t)
|
||||||
MOCKME_IMPL(uint32_t, Dma_GetFeMask, uint32_t)
|
DEFINE_MOCKPTR(uint32_t, Dma_GetFeMask, uint32_t)
|
||||||
MOCKME_IMPL(void, Dma_Init, struct dmainfo_t*, DMA_TypeDef*, uint32_t)
|
DEFINE_MOCKPTR(void, Dma_Init, struct dmainfo_t*, DMA_TypeDef*, uint32_t)
|
||||||
|
|
||||||
#define Dma_GetIsReg(...) Dma_GetIsReg_(__VA_ARGS__)
|
#define Dma_GetIsReg(...) Dma_GetIsReg_(__VA_ARGS__)
|
||||||
#define Dma_GetIfcReg(...) Dma_GetIfcReg_(__VA_ARGS__)
|
#define Dma_GetIfcReg(...) Dma_GetIfcReg_(__VA_ARGS__)
|
||||||
|
|
16
dmahelper.h
16
dmahelper.h
|
@ -28,14 +28,14 @@ struct dmainfo_t {
|
||||||
|
|
||||||
//>>>>>>>>>> MOCK <<<<<<<<<<
|
//>>>>>>>>>> MOCK <<<<<<<<<<
|
||||||
#ifdef UNITTEST
|
#ifdef UNITTEST
|
||||||
MOCKME_PREP(volatile uint32_t*, Dma_GetIsReg, DMA_TypeDef*, uint32_t)
|
DECLARE_MOCKPTR(volatile uint32_t*, Dma_GetIsReg, DMA_TypeDef*, uint32_t)
|
||||||
MOCKME_PREP(volatile uint32_t*, Dma_GetIfcReg, DMA_TypeDef*, uint32_t)
|
DECLARE_MOCKPTR(volatile uint32_t*, Dma_GetIfcReg, DMA_TypeDef*, uint32_t)
|
||||||
MOCKME_PREP(uint32_t, Dma_GetDmeMask, uint32_t)
|
DECLARE_MOCKPTR(uint32_t, Dma_GetDmeMask, uint32_t)
|
||||||
MOCKME_PREP(uint32_t, Dma_GetTeMask, uint32_t)
|
DECLARE_MOCKPTR(uint32_t, Dma_GetTeMask, uint32_t)
|
||||||
MOCKME_PREP(uint32_t, Dma_GetHtMask, uint32_t)
|
DECLARE_MOCKPTR(uint32_t, Dma_GetHtMask, uint32_t)
|
||||||
MOCKME_PREP(uint32_t, Dma_GetTcMask, uint32_t)
|
DECLARE_MOCKPTR(uint32_t, Dma_GetTcMask, uint32_t)
|
||||||
MOCKME_PREP(uint32_t, Dma_GetFeMask, uint32_t)
|
DECLARE_MOCKPTR(uint32_t, Dma_GetFeMask, uint32_t)
|
||||||
MOCKME_PREP(void, Dma_Init, struct dmainfo_t*, DMA_TypeDef*, uint32_t)
|
DECLARE_MOCKPTR(void, Dma_Init, struct dmainfo_t*, DMA_TypeDef*, uint32_t)
|
||||||
|
|
||||||
#define Dma_GetIsReg(...) Dma_GetIsReg_(__VA_ARGS__)
|
#define Dma_GetIsReg(...) Dma_GetIsReg_(__VA_ARGS__)
|
||||||
#define Dma_GetIfcReg(...) Dma_GetIfcReg_(__VA_ARGS__)
|
#define Dma_GetIfcReg(...) Dma_GetIfcReg_(__VA_ARGS__)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue