From 17b146c01867ffef193a228fd61e686f3658ee91 Mon Sep 17 00:00:00 2001 From: Attila BODY Date: Thu, 28 Nov 2019 07:06:09 +0100 Subject: [PATCH] Trying to find more descriptive names for mocking macros --- dmahelper.c | 16 ++++++++-------- dmahelper.h | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dmahelper.c b/dmahelper.c index 5f1d0c7..46f8f26 100644 --- a/dmahelper.c +++ b/dmahelper.c @@ -7,14 +7,14 @@ #include #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__) diff --git a/dmahelper.h b/dmahelper.h index f6285ca..f527587 100644 --- a/dmahelper.h +++ b/dmahelper.h @@ -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__)