| 39 | } |
| 40 | |
| 41 | void all_mock_support_c_calls(void) |
| 42 | { |
| 43 | mock_c()->strictOrder(); |
| 44 | mock_c()->expectOneCall("boo"); |
| 45 | mock_c()->expectNoCall("bla"); |
| 46 | mock_c()->expectNCalls(1, "foo"); |
| 47 | mock_c()->actualCall("boo"); |
| 48 | mock_c()->actualCall("foo"); |
| 49 | mock_c()->checkExpectations(); |
| 50 | |
| 51 | mock_c()->expectOneCall("boo")->withIntParameters("integer", 1)-> |
| 52 | withBoolParameters("bool", 1)-> |
| 53 | withUnsignedIntParameters("unsigned", 1)-> |
| 54 | withLongIntParameters("long int", (long int) -1)-> |
| 55 | withUnsignedLongIntParameters("unsigned long int", (unsigned long int) 1)-> |
| 56 | #ifdef CPPUTEST_USE_LONG_LONG |
| 57 | withLongLongIntParameters("long long int", (long long int) -1)-> |
| 58 | withUnsignedLongLongIntParameters("unsigned long long int", (unsigned long long int) 1)-> |
| 59 | #endif |
| 60 | |
| 61 | withDoubleParameters("double", 1.0)-> |
| 62 | withDoubleParametersAndTolerance("doubleWithTolerance", 1.0, 1.0)-> |
| 63 | withStringParameters("string", "string")-> |
| 64 | withPointerParameters("pointer", (void*) 1)-> |
| 65 | withConstPointerParameters("constpointer", (const void*) 1)-> |
| 66 | withFunctionPointerParameters("functionpointer", (void(*)(void)) 1)-> |
| 67 | withMemoryBufferParameter("name", (void*) 1, 0UL)-> |
| 68 | ignoreOtherParameters(); |
| 69 | |
| 70 | mock_c()->actualCall("boo")->withIntParameters("integer", 1)-> |
| 71 | withBoolParameters("bool", 1)-> |
| 72 | withUnsignedIntParameters("unsigned", 1)-> |
| 73 | withLongIntParameters("long int", (long int) -1)-> |
| 74 | withUnsignedLongIntParameters("unsigned long int", (unsigned long int) 1)-> |
| 75 | #ifdef CPPUTEST_USE_LONG_LONG |
| 76 | withLongLongIntParameters("long long int", (long long int) -1)-> |
| 77 | withUnsignedLongLongIntParameters("unsigned long long int", (unsigned long long int) 1)-> |
| 78 | #endif |
| 79 | withDoubleParameters("double", 1.0)-> |
| 80 | withDoubleParameters("doubleWithTolerance", 0.0 )-> |
| 81 | withStringParameters("string", "string")-> |
| 82 | withPointerParameters("pointer", (void*) 1)-> |
| 83 | withConstPointerParameters("constpointer", (const void*) 1)-> |
| 84 | withFunctionPointerParameters("functionpointer", (void(*)(void)) 1)-> |
| 85 | withMemoryBufferParameter("name", (void*) 1, 0UL)-> |
| 86 | hasReturnValue(); |
| 87 | |
| 88 | mock_c()->disable(); |
| 89 | mock_c()->expectOneCall("boo")->withParameterOfType("type", "name", (void*) 1)-> |
| 90 | withOutputParameterReturning("name", (void*)1, 0UL)-> |
| 91 | withOutputParameterOfTypeReturning("type", "name", (void*)1); |
| 92 | mock_c()->actualCall("boo")->withParameterOfType("type", "name", (void*) 1)-> |
| 93 | withOutputParameter("name", (void*)1)-> |
| 94 | withOutputParameterOfType("type", "name", (void*)1); |
| 95 | mock_c()->enable(); |
| 96 | |
| 97 | mock_c()->clear(); |
| 98 |
no test coverage detected