2 #include "ExampleCalls.h"
4 #include <RecordedCall.h>
8 char const *call_name =
"TakesNoArg";
9 RecordedCall *record_of_call = RecordedCall_new(call_name);
10 return record_of_call;
12 void Expect_TakesNoArg(
void) {
13 RecordExpectedCall(mock, Mock_TakesNoArg());
15 void TakesNoArg_Stubbed(
void) {
16 RecordActualCall(mock, Mock_TakesNoArg());
18 void SpanishInquisition_Stubbed(
void) {
19 RecordedCall *record_of_call = RecordedCall_new(
"SpanishInquisition");
20 RecordActualCall(mock, record_of_call);
25 char const *call_name =
"TakesOneArg";
26 RecordedCall *record_of_call = RecordedCall_new(call_name);
27 RecordedArg *record_of_arg1 = RecordedArg_new(SetupRecord_uint8_t);
28 *((uint8_t *)record_of_arg1->pArg) = b1;
29 RecordArg(record_of_call, record_of_arg1);
30 return record_of_call;
32 void Expect_TakesOneArg(uint8_t b1) {
33 RecordExpectedCall(mock, Mock_TakesOneArg(b1));
35 void TakesOneArg_Stubbed(uint8_t b1) {
36 RecordActualCall(mock, Mock_TakesOneArg(b1));
38 void TakesTwoArgs_StubbedWithCallName_TakesOneArg(uint8_t b1, uint8_t b2) {
39 RecordedCall *record_of_call = RecordedCall_new(
"TakesOneArg");
40 RecordedArg *record_of_arg1 = RecordedArg_new(SetupRecord_uint8_t);
41 *((uint8_t *)record_of_arg1->pArg) = b1;
42 RecordedArg *record_of_arg2 = RecordedArg_new(SetupRecord_uint8_t);
43 *((uint8_t *)record_of_arg2->pArg) = b2;
44 RecordArg(record_of_call, record_of_arg1);
45 RecordArg(record_of_call, record_of_arg2);
46 RecordActualCall(mock, record_of_call);
49 static RecordedCall * Mock_TakesTwoArgs(uint8_t b1, uint8_t b2)
51 char const *call_name =
"TakesTwoArgs";
52 RecordedCall *record_of_call = RecordedCall_new(call_name);
53 RecordedArg *record_of_arg1 = RecordedArg_new(SetupRecord_uint8_t);
54 *((uint8_t *)record_of_arg1->pArg) = b1;
55 RecordedArg *record_of_arg2 = RecordedArg_new(SetupRecord_uint8_t);
56 *((uint8_t *)record_of_arg2->pArg) = b2;
57 RecordArg(record_of_call, record_of_arg1);
58 RecordArg(record_of_call, record_of_arg2);
59 return record_of_call;
61 void Expect_TakesTwoArgs(uint8_t b1, uint8_t b2) {
62 RecordExpectedCall(mock, Mock_TakesTwoArgs(b1, b2));
64 void TakesTwoArgs_Stubbed(uint8_t b1, uint8_t b2) {
65 RecordActualCall(mock, Mock_TakesTwoArgs(b1, b2));
67 void TakesOneArg_StubbedWithCallName_TakesTwoArgs(uint8_t b1) {
68 RecordedCall *record_of_call = RecordedCall_new(
"TakesTwoArgs");
69 RecordedArg *record_of_arg1 = RecordedArg_new(SetupRecord_uint8_t);
70 *((uint8_t *)record_of_arg1->pArg) = b1;
71 RecordArg(record_of_call, record_of_arg1);
72 RecordActualCall(mock, record_of_call);