When mocking in my unit test the header file with 'mock_' prefix:
//-- mocking necessary file for compilation
#include "mock_em_core.h"
#include "mock_sid_pal_log_ifc.h"
#include "mock_sid_pal_assert_ifc.h"
#include "mock_queue.h"
#include "mock_task.h". <----- HERE
The generated Mock is looking like this, causing a compilation error:
--> HERE missing argument
void vTaskSwitchContext_CMockIgnoreAndReturn(UNITY_LINE_TYPE cmock_line, )void cmock_to_return);
The message error:
In file included from build/test/runners/test_swi_runner.c:11:
build/test/mocks/mock_task.h:901:74: error: expected parameter declarator
void vTaskSwitchContext_CMockIgnoreAndReturn(UNITY_LINE_TYPE cmock_line, )void cmock_to_return);
Hello,
I am trying to mock "task.h" using CMock (in a ceedling environment).
There is one problem I encountered wich is the following:
An internal FreeRTOS symbol is defined as :
And a function is declared as follows in "task.h" header file:
When mocking in my unit test the header file with 'mock_' prefix:
The generated Mock is looking like this, causing a compilation error:
The message error: