1 /* AUTOGENERATED FILE. DO NOT EDIT. */
2 #include <string.h>
3 #include <stdlib.h>
4 #include <setjmp.h>
5 #include "cmock.h"
6 #include "Mockfwk_core.h"
7 
8 static const char* CMockString_cookie = "cookie";
9 static const char* CMockString_event = "event";
10 static const char* CMockString_fwk_get_delayed_response = "fwk_get_delayed_response";
11 static const char* CMockString_fwk_get_first_delayed_response = "fwk_get_first_delayed_response";
12 static const char* CMockString_fwk_is_delayed_response_list_empty = "fwk_is_delayed_response_list_empty";
13 static const char* CMockString_fwk_process_event_queue = "fwk_process_event_queue";
14 static const char* CMockString_id = "id";
15 static const char* CMockString_is_empty = "is_empty";
16 
17 typedef struct _CMOCK_fwk_process_event_queue_CALL_INSTANCE
18 {
19   UNITY_LINE_TYPE LineNumber;
20   char ExpectAnyArgsBool;
21 
22 } CMOCK_fwk_process_event_queue_CALL_INSTANCE;
23 
24 typedef struct _CMOCK_fwk_get_delayed_response_CALL_INSTANCE
25 {
26   UNITY_LINE_TYPE LineNumber;
27   char ExpectAnyArgsBool;
28   int ReturnVal;
29   fwk_id_t Expected_id;
30   uint32_t Expected_cookie;
31   struct fwk_event* Expected_event;
32   int Expected_event_Depth;
33   char ReturnThruPtr_event_Used;
34   struct fwk_event* ReturnThruPtr_event_Val;
35   size_t ReturnThruPtr_event_Size;
36   char IgnoreArg_id;
37   char IgnoreArg_cookie;
38   char IgnoreArg_event;
39 
40 } CMOCK_fwk_get_delayed_response_CALL_INSTANCE;
41 
42 typedef struct _CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE
43 {
44   UNITY_LINE_TYPE LineNumber;
45   char ExpectAnyArgsBool;
46   int ReturnVal;
47   fwk_id_t Expected_id;
48   bool* Expected_is_empty;
49   int Expected_is_empty_Depth;
50   char ReturnThruPtr_is_empty_Used;
51   bool* ReturnThruPtr_is_empty_Val;
52   size_t ReturnThruPtr_is_empty_Size;
53   char IgnoreArg_id;
54   char IgnoreArg_is_empty;
55 
56 } CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE;
57 
58 typedef struct _CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE
59 {
60   UNITY_LINE_TYPE LineNumber;
61   char ExpectAnyArgsBool;
62   int ReturnVal;
63   fwk_id_t Expected_id;
64   struct fwk_event* Expected_event;
65   int Expected_event_Depth;
66   char ReturnThruPtr_event_Used;
67   struct fwk_event* ReturnThruPtr_event_Val;
68   size_t ReturnThruPtr_event_Size;
69   char IgnoreArg_id;
70   char IgnoreArg_event;
71 
72 } CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE;
73 
74 static struct Mockfwk_coreInstance
75 {
76   char fwk_process_event_queue_IgnoreBool;
77   char fwk_process_event_queue_CallbackBool;
78   CMOCK_fwk_process_event_queue_CALLBACK fwk_process_event_queue_CallbackFunctionPointer;
79   int fwk_process_event_queue_CallbackCalls;
80   CMOCK_MEM_INDEX_TYPE fwk_process_event_queue_CallInstance;
81   char fwk_get_delayed_response_IgnoreBool;
82   int fwk_get_delayed_response_FinalReturn;
83   char fwk_get_delayed_response_CallbackBool;
84   CMOCK_fwk_get_delayed_response_CALLBACK fwk_get_delayed_response_CallbackFunctionPointer;
85   int fwk_get_delayed_response_CallbackCalls;
86   CMOCK_MEM_INDEX_TYPE fwk_get_delayed_response_CallInstance;
87   char fwk_is_delayed_response_list_empty_IgnoreBool;
88   int fwk_is_delayed_response_list_empty_FinalReturn;
89   char fwk_is_delayed_response_list_empty_CallbackBool;
90   CMOCK_fwk_is_delayed_response_list_empty_CALLBACK fwk_is_delayed_response_list_empty_CallbackFunctionPointer;
91   int fwk_is_delayed_response_list_empty_CallbackCalls;
92   CMOCK_MEM_INDEX_TYPE fwk_is_delayed_response_list_empty_CallInstance;
93   char fwk_get_first_delayed_response_IgnoreBool;
94   int fwk_get_first_delayed_response_FinalReturn;
95   char fwk_get_first_delayed_response_CallbackBool;
96   CMOCK_fwk_get_first_delayed_response_CALLBACK fwk_get_first_delayed_response_CallbackFunctionPointer;
97   int fwk_get_first_delayed_response_CallbackCalls;
98   CMOCK_MEM_INDEX_TYPE fwk_get_first_delayed_response_CallInstance;
99 } Mock;
100 
101 extern jmp_buf AbortFrame;
102 
Mockfwk_core_Verify(void)103 void Mockfwk_core_Verify(void)
104 {
105   UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
106   CMOCK_MEM_INDEX_TYPE call_instance;
107   call_instance = Mock.fwk_process_event_queue_CallInstance;
108   if (Mock.fwk_process_event_queue_IgnoreBool)
109     call_instance = CMOCK_GUTS_NONE;
110   if (CMOCK_GUTS_NONE != call_instance)
111   {
112     UNITY_SET_DETAIL(CMockString_fwk_process_event_queue);
113     UNITY_TEST_FAIL(cmock_line, CMockStringCalledLess);
114   }
115   if (Mock.fwk_process_event_queue_CallbackFunctionPointer != NULL)
116   {
117     call_instance = CMOCK_GUTS_NONE;
118     (void)call_instance;
119   }
120   call_instance = Mock.fwk_get_delayed_response_CallInstance;
121   if (Mock.fwk_get_delayed_response_IgnoreBool)
122     call_instance = CMOCK_GUTS_NONE;
123   if (CMOCK_GUTS_NONE != call_instance)
124   {
125     UNITY_SET_DETAIL(CMockString_fwk_get_delayed_response);
126     UNITY_TEST_FAIL(cmock_line, CMockStringCalledLess);
127   }
128   if (Mock.fwk_get_delayed_response_CallbackFunctionPointer != NULL)
129   {
130     call_instance = CMOCK_GUTS_NONE;
131     (void)call_instance;
132   }
133   call_instance = Mock.fwk_is_delayed_response_list_empty_CallInstance;
134   if (Mock.fwk_is_delayed_response_list_empty_IgnoreBool)
135     call_instance = CMOCK_GUTS_NONE;
136   if (CMOCK_GUTS_NONE != call_instance)
137   {
138     UNITY_SET_DETAIL(CMockString_fwk_is_delayed_response_list_empty);
139     UNITY_TEST_FAIL(cmock_line, CMockStringCalledLess);
140   }
141   if (Mock.fwk_is_delayed_response_list_empty_CallbackFunctionPointer != NULL)
142   {
143     call_instance = CMOCK_GUTS_NONE;
144     (void)call_instance;
145   }
146   call_instance = Mock.fwk_get_first_delayed_response_CallInstance;
147   if (Mock.fwk_get_first_delayed_response_IgnoreBool)
148     call_instance = CMOCK_GUTS_NONE;
149   if (CMOCK_GUTS_NONE != call_instance)
150   {
151     UNITY_SET_DETAIL(CMockString_fwk_get_first_delayed_response);
152     UNITY_TEST_FAIL(cmock_line, CMockStringCalledLess);
153   }
154   if (Mock.fwk_get_first_delayed_response_CallbackFunctionPointer != NULL)
155   {
156     call_instance = CMOCK_GUTS_NONE;
157     (void)call_instance;
158   }
159 }
160 
Mockfwk_core_Init(void)161 void Mockfwk_core_Init(void)
162 {
163   Mockfwk_core_Destroy();
164 }
165 
Mockfwk_core_Destroy(void)166 void Mockfwk_core_Destroy(void)
167 {
168   CMock_Guts_MemFreeAll();
169   memset(&Mock, 0, sizeof(Mock));
170 }
171 
fwk_process_event_queue(void)172 void fwk_process_event_queue(void)
173 {
174   UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
175   CMOCK_fwk_process_event_queue_CALL_INSTANCE* cmock_call_instance;
176   UNITY_SET_DETAIL(CMockString_fwk_process_event_queue);
177   cmock_call_instance = (CMOCK_fwk_process_event_queue_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.fwk_process_event_queue_CallInstance);
178   Mock.fwk_process_event_queue_CallInstance = CMock_Guts_MemNext(Mock.fwk_process_event_queue_CallInstance);
179   if (Mock.fwk_process_event_queue_IgnoreBool)
180   {
181     UNITY_CLR_DETAILS();
182     return;
183   }
184   if (!Mock.fwk_process_event_queue_CallbackBool &&
185       Mock.fwk_process_event_queue_CallbackFunctionPointer != NULL)
186   {
187     Mock.fwk_process_event_queue_CallbackFunctionPointer(Mock.fwk_process_event_queue_CallbackCalls++);
188     UNITY_CLR_DETAILS();
189     return;
190   }
191   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringCalledMore);
192   cmock_line = cmock_call_instance->LineNumber;
193   if (Mock.fwk_process_event_queue_CallbackFunctionPointer != NULL)
194   {
195     Mock.fwk_process_event_queue_CallbackFunctionPointer(Mock.fwk_process_event_queue_CallbackCalls++);
196   }
197   UNITY_CLR_DETAILS();
198 }
199 
fwk_process_event_queue_CMockIgnore(void)200 void fwk_process_event_queue_CMockIgnore(void)
201 {
202   Mock.fwk_process_event_queue_IgnoreBool = (char)1;
203 }
204 
fwk_process_event_queue_CMockStopIgnore(void)205 void fwk_process_event_queue_CMockStopIgnore(void)
206 {
207   Mock.fwk_process_event_queue_IgnoreBool = (char)0;
208 }
209 
fwk_process_event_queue_CMockExpect(UNITY_LINE_TYPE cmock_line)210 void fwk_process_event_queue_CMockExpect(UNITY_LINE_TYPE cmock_line)
211 {
212   CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_fwk_process_event_queue_CALL_INSTANCE));
213   CMOCK_fwk_process_event_queue_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_process_event_queue_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
214   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringOutOfMemory);
215   memset(cmock_call_instance, 0, sizeof(*cmock_call_instance));
216   Mock.fwk_process_event_queue_CallInstance = CMock_Guts_MemChain(Mock.fwk_process_event_queue_CallInstance, cmock_guts_index);
217   Mock.fwk_process_event_queue_IgnoreBool = (char)0;
218   cmock_call_instance->LineNumber = cmock_line;
219   cmock_call_instance->ExpectAnyArgsBool = (char)0;
220 }
221 
fwk_process_event_queue_AddCallback(CMOCK_fwk_process_event_queue_CALLBACK Callback)222 void fwk_process_event_queue_AddCallback(CMOCK_fwk_process_event_queue_CALLBACK Callback)
223 {
224   Mock.fwk_process_event_queue_IgnoreBool = (char)0;
225   Mock.fwk_process_event_queue_CallbackBool = (char)1;
226   Mock.fwk_process_event_queue_CallbackFunctionPointer = Callback;
227 }
228 
fwk_process_event_queue_Stub(CMOCK_fwk_process_event_queue_CALLBACK Callback)229 void fwk_process_event_queue_Stub(CMOCK_fwk_process_event_queue_CALLBACK Callback)
230 {
231   Mock.fwk_process_event_queue_IgnoreBool = (char)0;
232   Mock.fwk_process_event_queue_CallbackBool = (char)0;
233   Mock.fwk_process_event_queue_CallbackFunctionPointer = Callback;
234 }
235 
fwk_get_delayed_response(fwk_id_t id,uint32_t cookie,struct fwk_event * event)236 int fwk_get_delayed_response(fwk_id_t id, uint32_t cookie, struct fwk_event* event)
237 {
238   UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
239   CMOCK_fwk_get_delayed_response_CALL_INSTANCE* cmock_call_instance;
240   UNITY_SET_DETAIL(CMockString_fwk_get_delayed_response);
241   cmock_call_instance = (CMOCK_fwk_get_delayed_response_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.fwk_get_delayed_response_CallInstance);
242   Mock.fwk_get_delayed_response_CallInstance = CMock_Guts_MemNext(Mock.fwk_get_delayed_response_CallInstance);
243   if (Mock.fwk_get_delayed_response_IgnoreBool)
244   {
245     UNITY_CLR_DETAILS();
246     if (cmock_call_instance == NULL)
247       return Mock.fwk_get_delayed_response_FinalReturn;
248     Mock.fwk_get_delayed_response_FinalReturn = cmock_call_instance->ReturnVal;
249     return cmock_call_instance->ReturnVal;
250   }
251   if (!Mock.fwk_get_delayed_response_CallbackBool &&
252       Mock.fwk_get_delayed_response_CallbackFunctionPointer != NULL)
253   {
254     int cmock_cb_ret = Mock.fwk_get_delayed_response_CallbackFunctionPointer(id, cookie, event, Mock.fwk_get_delayed_response_CallbackCalls++);
255     UNITY_CLR_DETAILS();
256     return cmock_cb_ret;
257   }
258   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringCalledMore);
259   cmock_line = cmock_call_instance->LineNumber;
260   if (!cmock_call_instance->ExpectAnyArgsBool)
261   {
262   if (!cmock_call_instance->IgnoreArg_id)
263   {
264     UNITY_SET_DETAILS(CMockString_fwk_get_delayed_response,CMockString_id);
265     UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(&cmock_call_instance->Expected_id), (void*)(&id), sizeof(fwk_id_t), cmock_line, CMockStringMismatch);
266   }
267   if (!cmock_call_instance->IgnoreArg_cookie)
268   {
269     UNITY_SET_DETAILS(CMockString_fwk_get_delayed_response,CMockString_cookie);
270     UNITY_TEST_ASSERT_EQUAL_HEX32(cmock_call_instance->Expected_cookie, cookie, cmock_line, CMockStringMismatch);
271   }
272   if (!cmock_call_instance->IgnoreArg_event)
273   {
274     UNITY_SET_DETAILS(CMockString_fwk_get_delayed_response,CMockString_event);
275     if (cmock_call_instance->Expected_event == NULL)
276       { UNITY_TEST_ASSERT_NULL(event, cmock_line, CMockStringExpNULL); }
277     else
278       { UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY((void*)(cmock_call_instance->Expected_event), (void*)(event), sizeof(struct fwk_event), cmock_call_instance->Expected_event_Depth, cmock_line, CMockStringMismatch); }
279   }
280   }
281   if (Mock.fwk_get_delayed_response_CallbackFunctionPointer != NULL)
282   {
283     cmock_call_instance->ReturnVal = Mock.fwk_get_delayed_response_CallbackFunctionPointer(id, cookie, event, Mock.fwk_get_delayed_response_CallbackCalls++);
284   }
285   if (cmock_call_instance->ReturnThruPtr_event_Used)
286   {
287     UNITY_TEST_ASSERT_NOT_NULL(event, cmock_line, CMockStringPtrIsNULL);
288     memcpy((void*)event, (void*)cmock_call_instance->ReturnThruPtr_event_Val,
289       cmock_call_instance->ReturnThruPtr_event_Size);
290   }
291   UNITY_CLR_DETAILS();
292   return cmock_call_instance->ReturnVal;
293 }
294 
295 void CMockExpectParameters_fwk_get_delayed_response(CMOCK_fwk_get_delayed_response_CALL_INSTANCE* cmock_call_instance, fwk_id_t id, uint32_t cookie, struct fwk_event* event, int event_Depth);
CMockExpectParameters_fwk_get_delayed_response(CMOCK_fwk_get_delayed_response_CALL_INSTANCE * cmock_call_instance,fwk_id_t id,uint32_t cookie,struct fwk_event * event,int event_Depth)296 void CMockExpectParameters_fwk_get_delayed_response(CMOCK_fwk_get_delayed_response_CALL_INSTANCE* cmock_call_instance, fwk_id_t id, uint32_t cookie, struct fwk_event* event, int event_Depth)
297 {
298   memcpy((void*)(&cmock_call_instance->Expected_id), (void*)(&id),
299          sizeof(fwk_id_t[sizeof(id) == sizeof(fwk_id_t) ? 1 : -1])); /* add fwk_id_t to :treat_as_array if this causes an error */
300   cmock_call_instance->IgnoreArg_id = 0;
301   cmock_call_instance->Expected_cookie = cookie;
302   cmock_call_instance->IgnoreArg_cookie = 0;
303   cmock_call_instance->Expected_event = event;
304   cmock_call_instance->Expected_event_Depth = event_Depth;
305   cmock_call_instance->IgnoreArg_event = 0;
306   cmock_call_instance->ReturnThruPtr_event_Used = 0;
307 }
308 
fwk_get_delayed_response_CMockIgnoreAndReturn(UNITY_LINE_TYPE cmock_line,int cmock_to_return)309 void fwk_get_delayed_response_CMockIgnoreAndReturn(UNITY_LINE_TYPE cmock_line, int cmock_to_return)
310 {
311   CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_fwk_get_delayed_response_CALL_INSTANCE));
312   CMOCK_fwk_get_delayed_response_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_get_delayed_response_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
313   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringOutOfMemory);
314   memset(cmock_call_instance, 0, sizeof(*cmock_call_instance));
315   Mock.fwk_get_delayed_response_CallInstance = CMock_Guts_MemChain(Mock.fwk_get_delayed_response_CallInstance, cmock_guts_index);
316   Mock.fwk_get_delayed_response_IgnoreBool = (char)0;
317   cmock_call_instance->LineNumber = cmock_line;
318   cmock_call_instance->ExpectAnyArgsBool = (char)0;
319   cmock_call_instance->ReturnVal = cmock_to_return;
320   Mock.fwk_get_delayed_response_IgnoreBool = (char)1;
321 }
322 
fwk_get_delayed_response_CMockStopIgnore(void)323 void fwk_get_delayed_response_CMockStopIgnore(void)
324 {
325   if(Mock.fwk_get_delayed_response_IgnoreBool)
326     Mock.fwk_get_delayed_response_CallInstance = CMock_Guts_MemNext(Mock.fwk_get_delayed_response_CallInstance);
327   Mock.fwk_get_delayed_response_IgnoreBool = (char)0;
328 }
329 
fwk_get_delayed_response_CMockExpectAnyArgsAndReturn(UNITY_LINE_TYPE cmock_line,int cmock_to_return)330 void fwk_get_delayed_response_CMockExpectAnyArgsAndReturn(UNITY_LINE_TYPE cmock_line, int cmock_to_return)
331 {
332   CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_fwk_get_delayed_response_CALL_INSTANCE));
333   CMOCK_fwk_get_delayed_response_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_get_delayed_response_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
334   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringOutOfMemory);
335   memset(cmock_call_instance, 0, sizeof(*cmock_call_instance));
336   Mock.fwk_get_delayed_response_CallInstance = CMock_Guts_MemChain(Mock.fwk_get_delayed_response_CallInstance, cmock_guts_index);
337   Mock.fwk_get_delayed_response_IgnoreBool = (char)0;
338   cmock_call_instance->LineNumber = cmock_line;
339   cmock_call_instance->ExpectAnyArgsBool = (char)0;
340   cmock_call_instance->ReturnVal = cmock_to_return;
341   cmock_call_instance->ExpectAnyArgsBool = (char)1;
342 }
343 
fwk_get_delayed_response_CMockExpectAndReturn(UNITY_LINE_TYPE cmock_line,fwk_id_t id,uint32_t cookie,struct fwk_event * event,int cmock_to_return)344 void fwk_get_delayed_response_CMockExpectAndReturn(UNITY_LINE_TYPE cmock_line, fwk_id_t id, uint32_t cookie, struct fwk_event* event, int cmock_to_return)
345 {
346   CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_fwk_get_delayed_response_CALL_INSTANCE));
347   CMOCK_fwk_get_delayed_response_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_get_delayed_response_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
348   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringOutOfMemory);
349   memset(cmock_call_instance, 0, sizeof(*cmock_call_instance));
350   Mock.fwk_get_delayed_response_CallInstance = CMock_Guts_MemChain(Mock.fwk_get_delayed_response_CallInstance, cmock_guts_index);
351   Mock.fwk_get_delayed_response_IgnoreBool = (char)0;
352   cmock_call_instance->LineNumber = cmock_line;
353   cmock_call_instance->ExpectAnyArgsBool = (char)0;
354   CMockExpectParameters_fwk_get_delayed_response(cmock_call_instance, id, cookie, event, 1);
355   cmock_call_instance->ReturnVal = cmock_to_return;
356 }
357 
fwk_get_delayed_response_AddCallback(CMOCK_fwk_get_delayed_response_CALLBACK Callback)358 void fwk_get_delayed_response_AddCallback(CMOCK_fwk_get_delayed_response_CALLBACK Callback)
359 {
360   Mock.fwk_get_delayed_response_IgnoreBool = (char)0;
361   Mock.fwk_get_delayed_response_CallbackBool = (char)1;
362   Mock.fwk_get_delayed_response_CallbackFunctionPointer = Callback;
363 }
364 
fwk_get_delayed_response_Stub(CMOCK_fwk_get_delayed_response_CALLBACK Callback)365 void fwk_get_delayed_response_Stub(CMOCK_fwk_get_delayed_response_CALLBACK Callback)
366 {
367   Mock.fwk_get_delayed_response_IgnoreBool = (char)0;
368   Mock.fwk_get_delayed_response_CallbackBool = (char)0;
369   Mock.fwk_get_delayed_response_CallbackFunctionPointer = Callback;
370 }
371 
fwk_get_delayed_response_CMockExpectWithArrayAndReturn(UNITY_LINE_TYPE cmock_line,fwk_id_t id,uint32_t cookie,struct fwk_event * event,int event_Depth,int cmock_to_return)372 void fwk_get_delayed_response_CMockExpectWithArrayAndReturn(UNITY_LINE_TYPE cmock_line, fwk_id_t id, uint32_t cookie, struct fwk_event* event, int event_Depth, int cmock_to_return)
373 {
374   CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_fwk_get_delayed_response_CALL_INSTANCE));
375   CMOCK_fwk_get_delayed_response_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_get_delayed_response_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
376   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringOutOfMemory);
377   memset(cmock_call_instance, 0, sizeof(*cmock_call_instance));
378   Mock.fwk_get_delayed_response_CallInstance = CMock_Guts_MemChain(Mock.fwk_get_delayed_response_CallInstance, cmock_guts_index);
379   Mock.fwk_get_delayed_response_IgnoreBool = (char)0;
380   cmock_call_instance->LineNumber = cmock_line;
381   cmock_call_instance->ExpectAnyArgsBool = (char)0;
382   CMockExpectParameters_fwk_get_delayed_response(cmock_call_instance, id, cookie, event, event_Depth);
383   cmock_call_instance->ReturnVal = cmock_to_return;
384 }
385 
fwk_get_delayed_response_CMockReturnMemThruPtr_event(UNITY_LINE_TYPE cmock_line,struct fwk_event * event,size_t cmock_size)386 void fwk_get_delayed_response_CMockReturnMemThruPtr_event(UNITY_LINE_TYPE cmock_line, struct fwk_event* event, size_t cmock_size)
387 {
388   CMOCK_fwk_get_delayed_response_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_get_delayed_response_CALL_INSTANCE*)CMock_Guts_GetAddressFor(CMock_Guts_MemEndOfChain(Mock.fwk_get_delayed_response_CallInstance));
389   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringPtrPreExp);
390   cmock_call_instance->ReturnThruPtr_event_Used = 1;
391   cmock_call_instance->ReturnThruPtr_event_Val = event;
392   cmock_call_instance->ReturnThruPtr_event_Size = cmock_size;
393 }
394 
fwk_get_delayed_response_CMockIgnoreArg_id(UNITY_LINE_TYPE cmock_line)395 void fwk_get_delayed_response_CMockIgnoreArg_id(UNITY_LINE_TYPE cmock_line)
396 {
397   CMOCK_fwk_get_delayed_response_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_get_delayed_response_CALL_INSTANCE*)CMock_Guts_GetAddressFor(CMock_Guts_MemEndOfChain(Mock.fwk_get_delayed_response_CallInstance));
398   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringIgnPreExp);
399   cmock_call_instance->IgnoreArg_id = 1;
400 }
401 
fwk_get_delayed_response_CMockIgnoreArg_cookie(UNITY_LINE_TYPE cmock_line)402 void fwk_get_delayed_response_CMockIgnoreArg_cookie(UNITY_LINE_TYPE cmock_line)
403 {
404   CMOCK_fwk_get_delayed_response_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_get_delayed_response_CALL_INSTANCE*)CMock_Guts_GetAddressFor(CMock_Guts_MemEndOfChain(Mock.fwk_get_delayed_response_CallInstance));
405   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringIgnPreExp);
406   cmock_call_instance->IgnoreArg_cookie = 1;
407 }
408 
fwk_get_delayed_response_CMockIgnoreArg_event(UNITY_LINE_TYPE cmock_line)409 void fwk_get_delayed_response_CMockIgnoreArg_event(UNITY_LINE_TYPE cmock_line)
410 {
411   CMOCK_fwk_get_delayed_response_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_get_delayed_response_CALL_INSTANCE*)CMock_Guts_GetAddressFor(CMock_Guts_MemEndOfChain(Mock.fwk_get_delayed_response_CallInstance));
412   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringIgnPreExp);
413   cmock_call_instance->IgnoreArg_event = 1;
414 }
415 
fwk_is_delayed_response_list_empty(fwk_id_t id,bool * is_empty)416 int fwk_is_delayed_response_list_empty(fwk_id_t id, bool* is_empty)
417 {
418   UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
419   CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE* cmock_call_instance;
420   UNITY_SET_DETAIL(CMockString_fwk_is_delayed_response_list_empty);
421   cmock_call_instance = (CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.fwk_is_delayed_response_list_empty_CallInstance);
422   Mock.fwk_is_delayed_response_list_empty_CallInstance = CMock_Guts_MemNext(Mock.fwk_is_delayed_response_list_empty_CallInstance);
423   if (Mock.fwk_is_delayed_response_list_empty_IgnoreBool)
424   {
425     UNITY_CLR_DETAILS();
426     if (cmock_call_instance == NULL)
427       return Mock.fwk_is_delayed_response_list_empty_FinalReturn;
428     Mock.fwk_is_delayed_response_list_empty_FinalReturn = cmock_call_instance->ReturnVal;
429     return cmock_call_instance->ReturnVal;
430   }
431   if (!Mock.fwk_is_delayed_response_list_empty_CallbackBool &&
432       Mock.fwk_is_delayed_response_list_empty_CallbackFunctionPointer != NULL)
433   {
434     int cmock_cb_ret = Mock.fwk_is_delayed_response_list_empty_CallbackFunctionPointer(id, is_empty, Mock.fwk_is_delayed_response_list_empty_CallbackCalls++);
435     UNITY_CLR_DETAILS();
436     return cmock_cb_ret;
437   }
438   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringCalledMore);
439   cmock_line = cmock_call_instance->LineNumber;
440   if (!cmock_call_instance->ExpectAnyArgsBool)
441   {
442   if (!cmock_call_instance->IgnoreArg_id)
443   {
444     UNITY_SET_DETAILS(CMockString_fwk_is_delayed_response_list_empty,CMockString_id);
445     UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(&cmock_call_instance->Expected_id), (void*)(&id), sizeof(fwk_id_t), cmock_line, CMockStringMismatch);
446   }
447   if (!cmock_call_instance->IgnoreArg_is_empty)
448   {
449     UNITY_SET_DETAILS(CMockString_fwk_is_delayed_response_list_empty,CMockString_is_empty);
450     if (cmock_call_instance->Expected_is_empty == NULL)
451       { UNITY_TEST_ASSERT_NULL(is_empty, cmock_line, CMockStringExpNULL); }
452     else
453       { UNITY_TEST_ASSERT_EQUAL_INT_ARRAY(cmock_call_instance->Expected_is_empty, is_empty, cmock_call_instance->Expected_is_empty_Depth, cmock_line, CMockStringMismatch); }
454   }
455   }
456   if (Mock.fwk_is_delayed_response_list_empty_CallbackFunctionPointer != NULL)
457   {
458     cmock_call_instance->ReturnVal = Mock.fwk_is_delayed_response_list_empty_CallbackFunctionPointer(id, is_empty, Mock.fwk_is_delayed_response_list_empty_CallbackCalls++);
459   }
460   if (cmock_call_instance->ReturnThruPtr_is_empty_Used)
461   {
462     UNITY_TEST_ASSERT_NOT_NULL(is_empty, cmock_line, CMockStringPtrIsNULL);
463     memcpy((void*)is_empty, (void*)cmock_call_instance->ReturnThruPtr_is_empty_Val,
464       cmock_call_instance->ReturnThruPtr_is_empty_Size);
465   }
466   UNITY_CLR_DETAILS();
467   return cmock_call_instance->ReturnVal;
468 }
469 
470 void CMockExpectParameters_fwk_is_delayed_response_list_empty(CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE* cmock_call_instance, fwk_id_t id, bool* is_empty, int is_empty_Depth);
CMockExpectParameters_fwk_is_delayed_response_list_empty(CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE * cmock_call_instance,fwk_id_t id,bool * is_empty,int is_empty_Depth)471 void CMockExpectParameters_fwk_is_delayed_response_list_empty(CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE* cmock_call_instance, fwk_id_t id, bool* is_empty, int is_empty_Depth)
472 {
473   memcpy((void*)(&cmock_call_instance->Expected_id), (void*)(&id),
474          sizeof(fwk_id_t[sizeof(id) == sizeof(fwk_id_t) ? 1 : -1])); /* add fwk_id_t to :treat_as_array if this causes an error */
475   cmock_call_instance->IgnoreArg_id = 0;
476   cmock_call_instance->Expected_is_empty = is_empty;
477   cmock_call_instance->Expected_is_empty_Depth = is_empty_Depth;
478   cmock_call_instance->IgnoreArg_is_empty = 0;
479   cmock_call_instance->ReturnThruPtr_is_empty_Used = 0;
480 }
481 
fwk_is_delayed_response_list_empty_CMockIgnoreAndReturn(UNITY_LINE_TYPE cmock_line,int cmock_to_return)482 void fwk_is_delayed_response_list_empty_CMockIgnoreAndReturn(UNITY_LINE_TYPE cmock_line, int cmock_to_return)
483 {
484   CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE));
485   CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
486   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringOutOfMemory);
487   memset(cmock_call_instance, 0, sizeof(*cmock_call_instance));
488   Mock.fwk_is_delayed_response_list_empty_CallInstance = CMock_Guts_MemChain(Mock.fwk_is_delayed_response_list_empty_CallInstance, cmock_guts_index);
489   Mock.fwk_is_delayed_response_list_empty_IgnoreBool = (char)0;
490   cmock_call_instance->LineNumber = cmock_line;
491   cmock_call_instance->ExpectAnyArgsBool = (char)0;
492   cmock_call_instance->ReturnVal = cmock_to_return;
493   Mock.fwk_is_delayed_response_list_empty_IgnoreBool = (char)1;
494 }
495 
fwk_is_delayed_response_list_empty_CMockStopIgnore(void)496 void fwk_is_delayed_response_list_empty_CMockStopIgnore(void)
497 {
498   if(Mock.fwk_is_delayed_response_list_empty_IgnoreBool)
499     Mock.fwk_is_delayed_response_list_empty_CallInstance = CMock_Guts_MemNext(Mock.fwk_is_delayed_response_list_empty_CallInstance);
500   Mock.fwk_is_delayed_response_list_empty_IgnoreBool = (char)0;
501 }
502 
fwk_is_delayed_response_list_empty_CMockExpectAnyArgsAndReturn(UNITY_LINE_TYPE cmock_line,int cmock_to_return)503 void fwk_is_delayed_response_list_empty_CMockExpectAnyArgsAndReturn(UNITY_LINE_TYPE cmock_line, int cmock_to_return)
504 {
505   CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE));
506   CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
507   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringOutOfMemory);
508   memset(cmock_call_instance, 0, sizeof(*cmock_call_instance));
509   Mock.fwk_is_delayed_response_list_empty_CallInstance = CMock_Guts_MemChain(Mock.fwk_is_delayed_response_list_empty_CallInstance, cmock_guts_index);
510   Mock.fwk_is_delayed_response_list_empty_IgnoreBool = (char)0;
511   cmock_call_instance->LineNumber = cmock_line;
512   cmock_call_instance->ExpectAnyArgsBool = (char)0;
513   cmock_call_instance->ReturnVal = cmock_to_return;
514   cmock_call_instance->ExpectAnyArgsBool = (char)1;
515 }
516 
fwk_is_delayed_response_list_empty_CMockExpectAndReturn(UNITY_LINE_TYPE cmock_line,fwk_id_t id,bool * is_empty,int cmock_to_return)517 void fwk_is_delayed_response_list_empty_CMockExpectAndReturn(UNITY_LINE_TYPE cmock_line, fwk_id_t id, bool* is_empty, int cmock_to_return)
518 {
519   CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE));
520   CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
521   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringOutOfMemory);
522   memset(cmock_call_instance, 0, sizeof(*cmock_call_instance));
523   Mock.fwk_is_delayed_response_list_empty_CallInstance = CMock_Guts_MemChain(Mock.fwk_is_delayed_response_list_empty_CallInstance, cmock_guts_index);
524   Mock.fwk_is_delayed_response_list_empty_IgnoreBool = (char)0;
525   cmock_call_instance->LineNumber = cmock_line;
526   cmock_call_instance->ExpectAnyArgsBool = (char)0;
527   CMockExpectParameters_fwk_is_delayed_response_list_empty(cmock_call_instance, id, is_empty, 1);
528   cmock_call_instance->ReturnVal = cmock_to_return;
529 }
530 
fwk_is_delayed_response_list_empty_AddCallback(CMOCK_fwk_is_delayed_response_list_empty_CALLBACK Callback)531 void fwk_is_delayed_response_list_empty_AddCallback(CMOCK_fwk_is_delayed_response_list_empty_CALLBACK Callback)
532 {
533   Mock.fwk_is_delayed_response_list_empty_IgnoreBool = (char)0;
534   Mock.fwk_is_delayed_response_list_empty_CallbackBool = (char)1;
535   Mock.fwk_is_delayed_response_list_empty_CallbackFunctionPointer = Callback;
536 }
537 
fwk_is_delayed_response_list_empty_Stub(CMOCK_fwk_is_delayed_response_list_empty_CALLBACK Callback)538 void fwk_is_delayed_response_list_empty_Stub(CMOCK_fwk_is_delayed_response_list_empty_CALLBACK Callback)
539 {
540   Mock.fwk_is_delayed_response_list_empty_IgnoreBool = (char)0;
541   Mock.fwk_is_delayed_response_list_empty_CallbackBool = (char)0;
542   Mock.fwk_is_delayed_response_list_empty_CallbackFunctionPointer = Callback;
543 }
544 
fwk_is_delayed_response_list_empty_CMockExpectWithArrayAndReturn(UNITY_LINE_TYPE cmock_line,fwk_id_t id,bool * is_empty,int is_empty_Depth,int cmock_to_return)545 void fwk_is_delayed_response_list_empty_CMockExpectWithArrayAndReturn(UNITY_LINE_TYPE cmock_line, fwk_id_t id, bool* is_empty, int is_empty_Depth, int cmock_to_return)
546 {
547   CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE));
548   CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
549   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringOutOfMemory);
550   memset(cmock_call_instance, 0, sizeof(*cmock_call_instance));
551   Mock.fwk_is_delayed_response_list_empty_CallInstance = CMock_Guts_MemChain(Mock.fwk_is_delayed_response_list_empty_CallInstance, cmock_guts_index);
552   Mock.fwk_is_delayed_response_list_empty_IgnoreBool = (char)0;
553   cmock_call_instance->LineNumber = cmock_line;
554   cmock_call_instance->ExpectAnyArgsBool = (char)0;
555   CMockExpectParameters_fwk_is_delayed_response_list_empty(cmock_call_instance, id, is_empty, is_empty_Depth);
556   cmock_call_instance->ReturnVal = cmock_to_return;
557 }
558 
fwk_is_delayed_response_list_empty_CMockReturnMemThruPtr_is_empty(UNITY_LINE_TYPE cmock_line,bool * is_empty,size_t cmock_size)559 void fwk_is_delayed_response_list_empty_CMockReturnMemThruPtr_is_empty(UNITY_LINE_TYPE cmock_line, bool* is_empty, size_t cmock_size)
560 {
561   CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE*)CMock_Guts_GetAddressFor(CMock_Guts_MemEndOfChain(Mock.fwk_is_delayed_response_list_empty_CallInstance));
562   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringPtrPreExp);
563   cmock_call_instance->ReturnThruPtr_is_empty_Used = 1;
564   cmock_call_instance->ReturnThruPtr_is_empty_Val = is_empty;
565   cmock_call_instance->ReturnThruPtr_is_empty_Size = cmock_size;
566 }
567 
fwk_is_delayed_response_list_empty_CMockIgnoreArg_id(UNITY_LINE_TYPE cmock_line)568 void fwk_is_delayed_response_list_empty_CMockIgnoreArg_id(UNITY_LINE_TYPE cmock_line)
569 {
570   CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE*)CMock_Guts_GetAddressFor(CMock_Guts_MemEndOfChain(Mock.fwk_is_delayed_response_list_empty_CallInstance));
571   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringIgnPreExp);
572   cmock_call_instance->IgnoreArg_id = 1;
573 }
574 
fwk_is_delayed_response_list_empty_CMockIgnoreArg_is_empty(UNITY_LINE_TYPE cmock_line)575 void fwk_is_delayed_response_list_empty_CMockIgnoreArg_is_empty(UNITY_LINE_TYPE cmock_line)
576 {
577   CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_is_delayed_response_list_empty_CALL_INSTANCE*)CMock_Guts_GetAddressFor(CMock_Guts_MemEndOfChain(Mock.fwk_is_delayed_response_list_empty_CallInstance));
578   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringIgnPreExp);
579   cmock_call_instance->IgnoreArg_is_empty = 1;
580 }
581 
fwk_get_first_delayed_response(fwk_id_t id,struct fwk_event * event)582 int fwk_get_first_delayed_response(fwk_id_t id, struct fwk_event* event)
583 {
584   UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
585   CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE* cmock_call_instance;
586   UNITY_SET_DETAIL(CMockString_fwk_get_first_delayed_response);
587   cmock_call_instance = (CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.fwk_get_first_delayed_response_CallInstance);
588   Mock.fwk_get_first_delayed_response_CallInstance = CMock_Guts_MemNext(Mock.fwk_get_first_delayed_response_CallInstance);
589   if (Mock.fwk_get_first_delayed_response_IgnoreBool)
590   {
591     UNITY_CLR_DETAILS();
592     if (cmock_call_instance == NULL)
593       return Mock.fwk_get_first_delayed_response_FinalReturn;
594     Mock.fwk_get_first_delayed_response_FinalReturn = cmock_call_instance->ReturnVal;
595     return cmock_call_instance->ReturnVal;
596   }
597   if (!Mock.fwk_get_first_delayed_response_CallbackBool &&
598       Mock.fwk_get_first_delayed_response_CallbackFunctionPointer != NULL)
599   {
600     int cmock_cb_ret = Mock.fwk_get_first_delayed_response_CallbackFunctionPointer(id, event, Mock.fwk_get_first_delayed_response_CallbackCalls++);
601     UNITY_CLR_DETAILS();
602     return cmock_cb_ret;
603   }
604   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringCalledMore);
605   cmock_line = cmock_call_instance->LineNumber;
606   if (!cmock_call_instance->ExpectAnyArgsBool)
607   {
608   if (!cmock_call_instance->IgnoreArg_id)
609   {
610     UNITY_SET_DETAILS(CMockString_fwk_get_first_delayed_response,CMockString_id);
611     UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(&cmock_call_instance->Expected_id), (void*)(&id), sizeof(fwk_id_t), cmock_line, CMockStringMismatch);
612   }
613   if (!cmock_call_instance->IgnoreArg_event)
614   {
615     UNITY_SET_DETAILS(CMockString_fwk_get_first_delayed_response,CMockString_event);
616     if (cmock_call_instance->Expected_event == NULL)
617       { UNITY_TEST_ASSERT_NULL(event, cmock_line, CMockStringExpNULL); }
618     else
619       { UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY((void*)(cmock_call_instance->Expected_event), (void*)(event), sizeof(struct fwk_event), cmock_call_instance->Expected_event_Depth, cmock_line, CMockStringMismatch); }
620   }
621   }
622   if (Mock.fwk_get_first_delayed_response_CallbackFunctionPointer != NULL)
623   {
624     cmock_call_instance->ReturnVal = Mock.fwk_get_first_delayed_response_CallbackFunctionPointer(id, event, Mock.fwk_get_first_delayed_response_CallbackCalls++);
625   }
626   if (cmock_call_instance->ReturnThruPtr_event_Used)
627   {
628     UNITY_TEST_ASSERT_NOT_NULL(event, cmock_line, CMockStringPtrIsNULL);
629     memcpy((void*)event, (void*)cmock_call_instance->ReturnThruPtr_event_Val,
630       cmock_call_instance->ReturnThruPtr_event_Size);
631   }
632   UNITY_CLR_DETAILS();
633   return cmock_call_instance->ReturnVal;
634 }
635 
636 void CMockExpectParameters_fwk_get_first_delayed_response(CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE* cmock_call_instance, fwk_id_t id, struct fwk_event* event, int event_Depth);
CMockExpectParameters_fwk_get_first_delayed_response(CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE * cmock_call_instance,fwk_id_t id,struct fwk_event * event,int event_Depth)637 void CMockExpectParameters_fwk_get_first_delayed_response(CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE* cmock_call_instance, fwk_id_t id, struct fwk_event* event, int event_Depth)
638 {
639   memcpy((void*)(&cmock_call_instance->Expected_id), (void*)(&id),
640          sizeof(fwk_id_t[sizeof(id) == sizeof(fwk_id_t) ? 1 : -1])); /* add fwk_id_t to :treat_as_array if this causes an error */
641   cmock_call_instance->IgnoreArg_id = 0;
642   cmock_call_instance->Expected_event = event;
643   cmock_call_instance->Expected_event_Depth = event_Depth;
644   cmock_call_instance->IgnoreArg_event = 0;
645   cmock_call_instance->ReturnThruPtr_event_Used = 0;
646 }
647 
fwk_get_first_delayed_response_CMockIgnoreAndReturn(UNITY_LINE_TYPE cmock_line,int cmock_to_return)648 void fwk_get_first_delayed_response_CMockIgnoreAndReturn(UNITY_LINE_TYPE cmock_line, int cmock_to_return)
649 {
650   CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE));
651   CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
652   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringOutOfMemory);
653   memset(cmock_call_instance, 0, sizeof(*cmock_call_instance));
654   Mock.fwk_get_first_delayed_response_CallInstance = CMock_Guts_MemChain(Mock.fwk_get_first_delayed_response_CallInstance, cmock_guts_index);
655   Mock.fwk_get_first_delayed_response_IgnoreBool = (char)0;
656   cmock_call_instance->LineNumber = cmock_line;
657   cmock_call_instance->ExpectAnyArgsBool = (char)0;
658   cmock_call_instance->ReturnVal = cmock_to_return;
659   Mock.fwk_get_first_delayed_response_IgnoreBool = (char)1;
660 }
661 
fwk_get_first_delayed_response_CMockStopIgnore(void)662 void fwk_get_first_delayed_response_CMockStopIgnore(void)
663 {
664   if(Mock.fwk_get_first_delayed_response_IgnoreBool)
665     Mock.fwk_get_first_delayed_response_CallInstance = CMock_Guts_MemNext(Mock.fwk_get_first_delayed_response_CallInstance);
666   Mock.fwk_get_first_delayed_response_IgnoreBool = (char)0;
667 }
668 
fwk_get_first_delayed_response_CMockExpectAnyArgsAndReturn(UNITY_LINE_TYPE cmock_line,int cmock_to_return)669 void fwk_get_first_delayed_response_CMockExpectAnyArgsAndReturn(UNITY_LINE_TYPE cmock_line, int cmock_to_return)
670 {
671   CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE));
672   CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
673   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringOutOfMemory);
674   memset(cmock_call_instance, 0, sizeof(*cmock_call_instance));
675   Mock.fwk_get_first_delayed_response_CallInstance = CMock_Guts_MemChain(Mock.fwk_get_first_delayed_response_CallInstance, cmock_guts_index);
676   Mock.fwk_get_first_delayed_response_IgnoreBool = (char)0;
677   cmock_call_instance->LineNumber = cmock_line;
678   cmock_call_instance->ExpectAnyArgsBool = (char)0;
679   cmock_call_instance->ReturnVal = cmock_to_return;
680   cmock_call_instance->ExpectAnyArgsBool = (char)1;
681 }
682 
fwk_get_first_delayed_response_CMockExpectAndReturn(UNITY_LINE_TYPE cmock_line,fwk_id_t id,struct fwk_event * event,int cmock_to_return)683 void fwk_get_first_delayed_response_CMockExpectAndReturn(UNITY_LINE_TYPE cmock_line, fwk_id_t id, struct fwk_event* event, int cmock_to_return)
684 {
685   CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE));
686   CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
687   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringOutOfMemory);
688   memset(cmock_call_instance, 0, sizeof(*cmock_call_instance));
689   Mock.fwk_get_first_delayed_response_CallInstance = CMock_Guts_MemChain(Mock.fwk_get_first_delayed_response_CallInstance, cmock_guts_index);
690   Mock.fwk_get_first_delayed_response_IgnoreBool = (char)0;
691   cmock_call_instance->LineNumber = cmock_line;
692   cmock_call_instance->ExpectAnyArgsBool = (char)0;
693   CMockExpectParameters_fwk_get_first_delayed_response(cmock_call_instance, id, event, 1);
694   cmock_call_instance->ReturnVal = cmock_to_return;
695 }
696 
fwk_get_first_delayed_response_AddCallback(CMOCK_fwk_get_first_delayed_response_CALLBACK Callback)697 void fwk_get_first_delayed_response_AddCallback(CMOCK_fwk_get_first_delayed_response_CALLBACK Callback)
698 {
699   Mock.fwk_get_first_delayed_response_IgnoreBool = (char)0;
700   Mock.fwk_get_first_delayed_response_CallbackBool = (char)1;
701   Mock.fwk_get_first_delayed_response_CallbackFunctionPointer = Callback;
702 }
703 
fwk_get_first_delayed_response_Stub(CMOCK_fwk_get_first_delayed_response_CALLBACK Callback)704 void fwk_get_first_delayed_response_Stub(CMOCK_fwk_get_first_delayed_response_CALLBACK Callback)
705 {
706   Mock.fwk_get_first_delayed_response_IgnoreBool = (char)0;
707   Mock.fwk_get_first_delayed_response_CallbackBool = (char)0;
708   Mock.fwk_get_first_delayed_response_CallbackFunctionPointer = Callback;
709 }
710 
fwk_get_first_delayed_response_CMockExpectWithArrayAndReturn(UNITY_LINE_TYPE cmock_line,fwk_id_t id,struct fwk_event * event,int event_Depth,int cmock_to_return)711 void fwk_get_first_delayed_response_CMockExpectWithArrayAndReturn(UNITY_LINE_TYPE cmock_line, fwk_id_t id, struct fwk_event* event, int event_Depth, int cmock_to_return)
712 {
713   CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE));
714   CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
715   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringOutOfMemory);
716   memset(cmock_call_instance, 0, sizeof(*cmock_call_instance));
717   Mock.fwk_get_first_delayed_response_CallInstance = CMock_Guts_MemChain(Mock.fwk_get_first_delayed_response_CallInstance, cmock_guts_index);
718   Mock.fwk_get_first_delayed_response_IgnoreBool = (char)0;
719   cmock_call_instance->LineNumber = cmock_line;
720   cmock_call_instance->ExpectAnyArgsBool = (char)0;
721   CMockExpectParameters_fwk_get_first_delayed_response(cmock_call_instance, id, event, event_Depth);
722   cmock_call_instance->ReturnVal = cmock_to_return;
723 }
724 
fwk_get_first_delayed_response_CMockReturnMemThruPtr_event(UNITY_LINE_TYPE cmock_line,struct fwk_event * event,size_t cmock_size)725 void fwk_get_first_delayed_response_CMockReturnMemThruPtr_event(UNITY_LINE_TYPE cmock_line, struct fwk_event* event, size_t cmock_size)
726 {
727   CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE*)CMock_Guts_GetAddressFor(CMock_Guts_MemEndOfChain(Mock.fwk_get_first_delayed_response_CallInstance));
728   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringPtrPreExp);
729   cmock_call_instance->ReturnThruPtr_event_Used = 1;
730   cmock_call_instance->ReturnThruPtr_event_Val = event;
731   cmock_call_instance->ReturnThruPtr_event_Size = cmock_size;
732 }
733 
fwk_get_first_delayed_response_CMockIgnoreArg_id(UNITY_LINE_TYPE cmock_line)734 void fwk_get_first_delayed_response_CMockIgnoreArg_id(UNITY_LINE_TYPE cmock_line)
735 {
736   CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE*)CMock_Guts_GetAddressFor(CMock_Guts_MemEndOfChain(Mock.fwk_get_first_delayed_response_CallInstance));
737   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringIgnPreExp);
738   cmock_call_instance->IgnoreArg_id = 1;
739 }
740 
fwk_get_first_delayed_response_CMockIgnoreArg_event(UNITY_LINE_TYPE cmock_line)741 void fwk_get_first_delayed_response_CMockIgnoreArg_event(UNITY_LINE_TYPE cmock_line)
742 {
743   CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE* cmock_call_instance = (CMOCK_fwk_get_first_delayed_response_CALL_INSTANCE*)CMock_Guts_GetAddressFor(CMock_Guts_MemEndOfChain(Mock.fwk_get_first_delayed_response_CallInstance));
744   UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringIgnPreExp);
745   cmock_call_instance->IgnoreArg_event = 1;
746 }
747 
748