Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion FreeRTOS/Test/CMock/event_groups/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ MOCK_FILES_FP += $(PROJECT_DIR)/list_macros.h
CPPFLAGS += -DportUSING_MPU_WRAPPERS=0

# List any addiitonal flags needed by the compiler
CFLAGS += -include list_macros.h
CFLAGS += -include list_macros.h
CFLAGS += -Wno-incompatible-pointer-types

# Try not to edit beyond this line unless necessary.

Expand Down
11 changes: 10 additions & 1 deletion FreeRTOS/Test/CMock/queue/queue_utest_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,16 @@ static size_t uxLastMallocSize = 0;
static void * pLastFreedAddress = 0;
static uint32_t ulNumMallocCalls = 0;

/* ========================== CALLBACK FUNCTIONS =========================== */
/* =========================== HELPER FUNCTIONS =========================== */
void setxMaskAssertAndAbort( bool mask )
{
xMaskAssertAndAbort = mask;
}
bool getxMaskAssertAndAbort( )
{
return xMaskAssertAndAbort;
}
/* ========================== CALLBACK FUNCTIONS ========================== */

void * pvPortMalloc( size_t xSize )
{
Expand Down
6 changes: 4 additions & 2 deletions FreeRTOS/Test/CMock/queue/queue_utest_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@
#define TICKS_TO_WAIT 10
#define NUM_CALLS_TO_INTERCEPT TICKS_TO_WAIT / 2

/* =========================== FUNCTION PROTOTYPES ======================== */
void setxMaskAssertAndAbort( bool mask );
bool getxMaskAssertAndAbort( );
/* ============================ GLOBAL VARIABLES =========================== */
bool xMaskAssertAndAbort;

/* ================================= MACROS ================================ */

Expand All @@ -82,7 +84,7 @@ bool xMaskAssertAndAbort;
#define EXPECT_ASSERT_BREAK( call ) \
do \
{ \
xMaskAssertAndAbort = true; \
setxMaskAssertAndAbort( true ); \
CEXCEPTION_T e = CEXCEPTION_NONE; \
Try \
{ \
Expand Down
2 changes: 1 addition & 1 deletion FreeRTOS/Test/CMock/queue/tracing/queue_registry_utest.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void test_vQueueAddToRegistry_twice( void )
const char * pcFakeString1 = ( char * ) ( BaseType_t ) getNextMonotonicTestValue();
const char * pcFakeString2 = ( char * ) ( BaseType_t ) getNextMonotonicTestValue();

/* Add an item to the registry **/
/* Add an item to the registry */
vQueueAddToRegistry( xFakeHandle, pcFakeString1 );

TEST_ASSERT_TRUE( helper_find_in_queue_registry( xFakeHandle, pcFakeString1 ) );
Expand Down
2 changes: 1 addition & 1 deletion FreeRTOS/Test/CMock/testdir.mk
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ $(PROJ_DIR)/%.i : $(KERNEL_DIR)/%.c

# compile the project objects with coverage instrumented
$(PROJ_DIR)/%.o : $(PROJ_DIR)/%.i
$(CC) -c $< $(CPPFLAGS) $(INCLUDE_DIR) $(GCC_COV_OPTS) -o $@
$(CC) -c $< $(CPPFLAGS) $(CFLAGS) $(INCLUDE_DIR) $(GCC_COV_OPTS) -o $@

# Build mock objects
$(SCRATCH_DIR)/mock_%.o : $(MOCKS_DIR)/mock_%.c
Expand Down