void initTokenizer_CMockIgnoreAndReturn(UNITY_LINE_TYPE cmock_line, Tokenizer* cmock_to_return)
{
  CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_initTokenizer_CALL_INSTANCE));
  CMOCK_initTokenizer_CALL_INSTANCE* cmock_call_instance = (CMOCK_initTokenizer_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "CMock has run out of memory. Please allocate more.");
  Mock.initTokenizer_CallInstance = CMock_Guts_MemChain(Mock.initTokenizer_CallInstance, cmock_guts_index);
  cmock_call_instance->LineNumber = cmock_line;
  cmock_call_instance->ExceptionToThrow = CEXCEPTION_NONE;
  cmock_call_instance->ReturnVal = cmock_to_return;
  Mock.initTokenizer_IgnoreBool = (int)1;
}
void calculate_CMockExpectAndReturn(UNITY_LINE_TYPE cmock_line, Operator* opeToken, Number* first, Number* second, Token* cmock_to_return)
{
  CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_calculate_CALL_INSTANCE));
  CMOCK_calculate_CALL_INSTANCE* cmock_call_instance = (CMOCK_calculate_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "CMock has run out of memory. Please allocate more.");
  Mock.calculate_CallInstance = CMock_Guts_MemChain(Mock.calculate_CallInstance, cmock_guts_index);
  cmock_call_instance->LineNumber = cmock_line;
  cmock_call_instance->CallOrder = ++GlobalExpectCount;
  CMockExpectParameters_calculate(cmock_call_instance, opeToken, first, second);
  cmock_call_instance->ReturnVal = cmock_to_return;
}
Beispiel #3
0
void Stack_push_CMockExpect(UNITY_LINE_TYPE cmock_line, Stack* stack, void* element)
{
  CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_Stack_push_CALL_INSTANCE));
  CMOCK_Stack_push_CALL_INSTANCE* cmock_call_instance = (CMOCK_Stack_push_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "CMock has run out of memory. Please allocate more.");
  Mock.Stack_push_CallInstance = CMock_Guts_MemChain(Mock.Stack_push_CallInstance, cmock_guts_index);
  cmock_call_instance->LineNumber = cmock_line;
  cmock_call_instance->CallOrder = ++GlobalExpectCount;
  cmock_call_instance->ExceptionToThrow = CEXCEPTION_NONE;
  CMockExpectParameters_Stack_push(cmock_call_instance, stack, element);
}
void system_write_CMockExpect(UNITY_LINE_TYPE cmock_line, S_DATA* dest, S_DATA value)
{
  CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_system_write_CALL_INSTANCE));
  CMOCK_system_write_CALL_INSTANCE* cmock_call_instance = (CMOCK_system_write_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringOutOfMemory);
  memset(cmock_call_instance, 0, sizeof(*cmock_call_instance));
  Mock.system_write_CallInstance = CMock_Guts_MemChain(Mock.system_write_CallInstance, cmock_guts_index);
  cmock_call_instance->LineNumber = cmock_line;
  CMockExpectParameters_system_write(cmock_call_instance, dest, value);
  UNITY_CLR_DETAILS();
}
Beispiel #5
0
void Stack_create_CMockExpectAndReturn(UNITY_LINE_TYPE cmock_line, Stack* cmock_to_return)
{
  CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_Stack_create_CALL_INSTANCE));
  CMOCK_Stack_create_CALL_INSTANCE* cmock_call_instance = (CMOCK_Stack_create_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "CMock has run out of memory. Please allocate more.");
  Mock.Stack_create_CallInstance = CMock_Guts_MemChain(Mock.Stack_create_CallInstance, cmock_guts_index);
  cmock_call_instance->LineNumber = cmock_line;
  cmock_call_instance->CallOrder = ++GlobalExpectCount;
  cmock_call_instance->ExceptionToThrow = CEXCEPTION_NONE;
  cmock_call_instance->ReturnVal = cmock_to_return;
}
void system_read_CMockExpectAndReturn(UNITY_LINE_TYPE cmock_line, S_DATA* src, S_DATA cmock_to_return)
{
  CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_system_read_CALL_INSTANCE));
  CMOCK_system_read_CALL_INSTANCE* cmock_call_instance = (CMOCK_system_read_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringOutOfMemory);
  memset(cmock_call_instance, 0, sizeof(*cmock_call_instance));
  Mock.system_read_CallInstance = CMock_Guts_MemChain(Mock.system_read_CallInstance, cmock_guts_index);
  cmock_call_instance->LineNumber = cmock_line;
  CMockExpectParameters_system_read(cmock_call_instance, src);
  memcpy(&cmock_call_instance->ReturnVal, &cmock_to_return, sizeof(S_DATA));
  UNITY_CLR_DETAILS();
}
void stringCopy_CMockExpectAndThrow(UNITY_LINE_TYPE cmock_line, char* source, char* destination, int startLocation, int length, CEXCEPTION_T cmock_to_throw)
{
  CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_stringCopy_CALL_INSTANCE));
  CMOCK_stringCopy_CALL_INSTANCE* cmock_call_instance = (CMOCK_stringCopy_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "CMock has run out of memory. Please allocate more.");
  Mock.stringCopy_CallInstance = CMock_Guts_MemChain(Mock.stringCopy_CallInstance, cmock_guts_index);
  cmock_call_instance->LineNumber = cmock_line;
  cmock_call_instance->CallOrder = ++GlobalExpectCount;
  cmock_call_instance->ExceptionToThrow = CEXCEPTION_NONE;
  CMockExpectParameters_stringCopy(cmock_call_instance, source, destination, startLocation, length);
  cmock_call_instance->ExceptionToThrow = cmock_to_throw;
}
void system_init_CMockExpectAndReturn(UNITY_LINE_TYPE cmock_line, void* base_address, uint32_t type_size, void* cmock_to_return)
{
  CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_system_init_CALL_INSTANCE));
  CMOCK_system_init_CALL_INSTANCE* cmock_call_instance = (CMOCK_system_init_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringOutOfMemory);
  memset(cmock_call_instance, 0, sizeof(*cmock_call_instance));
  Mock.system_init_CallInstance = CMock_Guts_MemChain(Mock.system_init_CallInstance, cmock_guts_index);
  cmock_call_instance->LineNumber = cmock_line;
  CMockExpectParameters_system_init(cmock_call_instance, base_address, type_size);
  cmock_call_instance->ReturnVal = cmock_to_return;
  UNITY_CLR_DETAILS();
}
void getWordAndUpdate_CMockExpectAndThrow(UNITY_LINE_TYPE cmock_line, String* line, char* delimiter, CEXCEPTION_T cmock_to_throw)
{
  CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_getWordAndUpdate_CALL_INSTANCE));
  CMOCK_getWordAndUpdate_CALL_INSTANCE* cmock_call_instance = (CMOCK_getWordAndUpdate_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "CMock has run out of memory. Please allocate more.");
  Mock.getWordAndUpdate_CallInstance = CMock_Guts_MemChain(Mock.getWordAndUpdate_CallInstance, cmock_guts_index);
  cmock_call_instance->LineNumber = cmock_line;
  cmock_call_instance->CallOrder = ++GlobalExpectCount;
  cmock_call_instance->ExceptionToThrow = CEXCEPTION_NONE;
  CMockExpectParameters_getWordAndUpdate(cmock_call_instance, line, delimiter);
  cmock_call_instance->ExceptionToThrow = cmock_to_throw;
}
void isNumber_CMockExpectAndThrow(UNITY_LINE_TYPE cmock_line, Token* unknownToken, CEXCEPTION_T cmock_to_throw)
{
  CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_isNumber_CALL_INSTANCE));
  CMOCK_isNumber_CALL_INSTANCE* cmock_call_instance = (CMOCK_isNumber_CALL_INSTANCE*)CMock_Guts_GetAddressFor(cmock_guts_index);
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "CMock has run out of memory. Please allocate more.");
  Mock.isNumber_CallInstance = CMock_Guts_MemChain(Mock.isNumber_CallInstance, cmock_guts_index);
  cmock_call_instance->LineNumber = cmock_line;
  cmock_call_instance->CallOrder = ++GlobalExpectCount;
  cmock_call_instance->ExceptionToThrow = CEXCEPTION_NONE;
  CMockExpectParameters_isNumber(cmock_call_instance, unknownToken);
  cmock_call_instance->ExceptionToThrow = cmock_to_throw;
}
S_DATA mock_system_read_impl(S_DATA* src)
{
  UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
  UNITY_SET_DETAIL(CMockString_system_read);
  CMOCK_system_read_CALL_INSTANCE* cmock_call_instance = (CMOCK_system_read_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.system_read_CallInstance);
  Mock.system_read_CallInstance = CMock_Guts_MemNext(Mock.system_read_CallInstance);
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringCalledMore);
  cmock_line = cmock_call_instance->LineNumber;
  {
    UNITY_SET_DETAILS(CMockString_system_read,CMockString_src);
    UNITY_TEST_ASSERT_EQUAL_PTR((void*)(cmock_call_instance->Expected_src), (void*)(src), cmock_line, CMockStringMismatch);
  }
  UNITY_CLR_DETAILS();
  return cmock_call_instance->ReturnVal;
}
Beispiel #12
0
void LED_Toggle(void)
{
  UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
  CMOCK_LED_Toggle_CALL_INSTANCE* cmock_call_instance = (CMOCK_LED_Toggle_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.LED_Toggle_CallInstance);
  Mock.LED_Toggle_CallInstance = CMock_Guts_MemNext(Mock.LED_Toggle_CallInstance);
  if (Mock.LED_Toggle_IgnoreBool)
  {
    return;
  }
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "Function 'LED_Toggle' called more times than expected.");
  cmock_line = cmock_call_instance->LineNumber;
  if (cmock_call_instance->CallOrder > ++GlobalVerifyOrder)
    UNITY_TEST_FAIL(cmock_line, "Function 'LED_Toggle' called earlier than expected.");
  if (cmock_call_instance->CallOrder < GlobalVerifyOrder)
    UNITY_TEST_FAIL(cmock_line, "Function 'LED_Toggle' called later than expected.");
}
void qeocore_remote_registration_init_cond(void)
{
  UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
  CMOCK_qeocore_remote_registration_init_cond_CALL_INSTANCE* cmock_call_instance = (CMOCK_qeocore_remote_registration_init_cond_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.qeocore_remote_registration_init_cond_CallInstance);
  Mock.qeocore_remote_registration_init_cond_CallInstance = CMock_Guts_MemNext(Mock.qeocore_remote_registration_init_cond_CallInstance);
  if (Mock.qeocore_remote_registration_init_cond_IgnoreBool)
  {
    return;
  }
  if (Mock.qeocore_remote_registration_init_cond_CallbackFunctionPointer != NULL)
  {
    Mock.qeocore_remote_registration_init_cond_CallbackFunctionPointer(Mock.qeocore_remote_registration_init_cond_CallbackCalls++);
    return;
  }
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "Function 'qeocore_remote_registration_init_cond' called more times than expected.");
  cmock_line = cmock_call_instance->LineNumber;
}
void qeocore_remote_registration_set_key(EVP_PKEY* key)
{
  UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
  CMOCK_qeocore_remote_registration_set_key_CALL_INSTANCE* cmock_call_instance = (CMOCK_qeocore_remote_registration_set_key_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.qeocore_remote_registration_set_key_CallInstance);
  Mock.qeocore_remote_registration_set_key_CallInstance = CMock_Guts_MemNext(Mock.qeocore_remote_registration_set_key_CallInstance);
  if (Mock.qeocore_remote_registration_set_key_IgnoreBool)
  {
    return;
  }
  if (Mock.qeocore_remote_registration_set_key_CallbackFunctionPointer != NULL)
  {
    Mock.qeocore_remote_registration_set_key_CallbackFunctionPointer(key, Mock.qeocore_remote_registration_set_key_CallbackCalls++);
    return;
  }
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "Function 'qeocore_remote_registration_set_key' called more times than expected.");
  cmock_line = cmock_call_instance->LineNumber;
  UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(cmock_call_instance->Expected_key), (void*)(key), sizeof(EVP_PKEY), cmock_line, "Function 'qeocore_remote_registration_set_key' called with unexpected value for argument 'key'.");
}
void qeo_deviceinfo_publish(qeo_factory_t* factory)
{
  UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
  CMOCK_qeo_deviceinfo_publish_CALL_INSTANCE* cmock_call_instance = (CMOCK_qeo_deviceinfo_publish_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.qeo_deviceinfo_publish_CallInstance);
  Mock.qeo_deviceinfo_publish_CallInstance = CMock_Guts_MemNext(Mock.qeo_deviceinfo_publish_CallInstance);
  if (Mock.qeo_deviceinfo_publish_IgnoreBool)
  {
    return;
  }
  if (Mock.qeo_deviceinfo_publish_CallbackFunctionPointer != NULL)
  {
    Mock.qeo_deviceinfo_publish_CallbackFunctionPointer(factory, Mock.qeo_deviceinfo_publish_CallbackCalls++);
    return;
  }
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "Function 'qeo_deviceinfo_publish' called more times than expected.");
  cmock_line = cmock_call_instance->LineNumber;
  UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(cmock_call_instance->Expected_factory), (void*)(factory), sizeof(qeo_factory_t), cmock_line, "Function 'qeo_deviceinfo_publish' called with unexpected value for argument 'factory'.");
}
Beispiel #16
0
int System_AbortRequested(void)
{
  UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
  CMOCK_System_AbortRequested_CALL_INSTANCE* cmock_call_instance = (CMOCK_System_AbortRequested_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.System_AbortRequested_CallInstance);
  Mock.System_AbortRequested_CallInstance = CMock_Guts_MemNext(Mock.System_AbortRequested_CallInstance);
  if (Mock.System_AbortRequested_IgnoreBool)
  {
    if (cmock_call_instance == NULL)
      return Mock.System_AbortRequested_FinalReturn;
    Mock.System_AbortRequested_FinalReturn = cmock_call_instance->ReturnVal;
    return cmock_call_instance->ReturnVal;
  }
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "Function 'System_AbortRequested' called more times than expected.");
  cmock_line = cmock_call_instance->LineNumber;
  if (cmock_call_instance->CallOrder > ++GlobalVerifyOrder)
    UNITY_TEST_FAIL(cmock_line, "Function 'System_AbortRequested' called earlier than expected.");
  if (cmock_call_instance->CallOrder < GlobalVerifyOrder)
    UNITY_TEST_FAIL(cmock_line, "Function 'System_AbortRequested' called later than expected.");
  return cmock_call_instance->ReturnVal;
}
void qeo_platform_security_update_state(qeo_platform_security_context_t context, qeo_platform_security_state state, qeo_platform_security_state_reason state_reason)
{
    UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
    CMOCK_qeo_platform_security_update_state_CALL_INSTANCE* cmock_call_instance = (CMOCK_qeo_platform_security_update_state_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.qeo_platform_security_update_state_CallInstance);
    Mock.qeo_platform_security_update_state_CallInstance = CMock_Guts_MemNext(Mock.qeo_platform_security_update_state_CallInstance);
    if (Mock.qeo_platform_security_update_state_IgnoreBool)
    {
        return;
    }
    if (Mock.qeo_platform_security_update_state_CallbackFunctionPointer != NULL)
    {
        Mock.qeo_platform_security_update_state_CallbackFunctionPointer(context, state, state_reason, Mock.qeo_platform_security_update_state_CallbackCalls++);
        return;
    }
    UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "Function 'qeo_platform_security_update_state' called more times than expected.");
    cmock_line = cmock_call_instance->LineNumber;
    UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(&cmock_call_instance->Expected_context), (void*)(&context), sizeof(qeo_platform_security_context_t), cmock_line, "Function 'qeo_platform_security_update_state' called with unexpected value for argument 'context'.");
    UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(&cmock_call_instance->Expected_state), (void*)(&state), sizeof(qeo_platform_security_state), cmock_line, "Function 'qeo_platform_security_update_state' called with unexpected value for argument 'state'.");
    UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(&cmock_call_instance->Expected_state_reason), (void*)(&state_reason), sizeof(qeo_platform_security_state_reason), cmock_line, "Function 'qeo_platform_security_update_state' called with unexpected value for argument 'state_reason'.");
}
Beispiel #18
0
qeo_retcode_t qeo_security_policy_destroy(void)
{
    UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
    CMOCK_qeo_security_policy_destroy_CALL_INSTANCE* cmock_call_instance = (CMOCK_qeo_security_policy_destroy_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.qeo_security_policy_destroy_CallInstance);
    Mock.qeo_security_policy_destroy_CallInstance = CMock_Guts_MemNext(Mock.qeo_security_policy_destroy_CallInstance);
    if (Mock.qeo_security_policy_destroy_IgnoreBool)
    {
        if (cmock_call_instance == NULL)
            return Mock.qeo_security_policy_destroy_FinalReturn;
        memcpy(&Mock.qeo_security_policy_destroy_FinalReturn, &cmock_call_instance->ReturnVal, sizeof(qeo_retcode_t));
        return cmock_call_instance->ReturnVal;
    }
    if (Mock.qeo_security_policy_destroy_CallbackFunctionPointer != NULL)
    {
        return Mock.qeo_security_policy_destroy_CallbackFunctionPointer(Mock.qeo_security_policy_destroy_CallbackCalls++);
    }
    UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "Function 'qeo_security_policy_destroy' called more times than expected.");
    cmock_line = cmock_call_instance->LineNumber;
    return cmock_call_instance->ReturnVal;
}
Beispiel #19
0
void I2CWriteInit(void)
{
  UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
  CMOCK_I2CWriteInit_CALL_INSTANCE* cmock_call_instance = (CMOCK_I2CWriteInit_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.I2CWriteInit_CallInstance);
  Mock.I2CWriteInit_CallInstance = CMock_Guts_MemNext(Mock.I2CWriteInit_CallInstance);
  if (Mock.I2CWriteInit_IgnoreBool)
  {
    return;
  }
  if (Mock.I2CWriteInit_CallbackFunctionPointer != NULL)
  {
    Mock.I2CWriteInit_CallbackFunctionPointer(Mock.I2CWriteInit_CallbackCalls++);
    return;
  }
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "Function 'I2CWriteInit' called more times than expected.");
  cmock_line = cmock_call_instance->LineNumber;
  if (cmock_call_instance->CallOrder > ++GlobalVerifyOrder)
    UNITY_TEST_FAIL(cmock_line, "Function 'I2CWriteInit' called earlier than expected.");
  if (cmock_call_instance->CallOrder < GlobalVerifyOrder)
    UNITY_TEST_FAIL(cmock_line, "Function 'I2CWriteInit' called later than expected.");
}
qeo_retcode_t qeo_remote_registration_enable_using_new_registration_credentials(qeo_remote_registration_hndl_t remote_reg)
{
  UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
  CMOCK_qeo_remote_registration_enable_using_new_registration_credentials_CALL_INSTANCE* cmock_call_instance = (CMOCK_qeo_remote_registration_enable_using_new_registration_credentials_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.qeo_remote_registration_enable_using_new_registration_credentials_CallInstance);
  Mock.qeo_remote_registration_enable_using_new_registration_credentials_CallInstance = CMock_Guts_MemNext(Mock.qeo_remote_registration_enable_using_new_registration_credentials_CallInstance);
  if (Mock.qeo_remote_registration_enable_using_new_registration_credentials_IgnoreBool)
  {
    if (cmock_call_instance == NULL)
      return Mock.qeo_remote_registration_enable_using_new_registration_credentials_FinalReturn;
    memcpy(&Mock.qeo_remote_registration_enable_using_new_registration_credentials_FinalReturn, &cmock_call_instance->ReturnVal, sizeof(qeo_retcode_t));
    return cmock_call_instance->ReturnVal;
  }
  if (Mock.qeo_remote_registration_enable_using_new_registration_credentials_CallbackFunctionPointer != NULL)
  {
    return Mock.qeo_remote_registration_enable_using_new_registration_credentials_CallbackFunctionPointer(remote_reg, Mock.qeo_remote_registration_enable_using_new_registration_credentials_CallbackCalls++);
  }
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "Function 'qeo_remote_registration_enable_using_new_registration_credentials' called more times than expected.");
  cmock_line = cmock_call_instance->LineNumber;
  UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(&cmock_call_instance->Expected_remote_reg), (void*)(&remote_reg), sizeof(qeo_remote_registration_hndl_t), cmock_line, "Function 'qeo_remote_registration_enable_using_new_registration_credentials' called with unexpected value for argument 'remote_reg'.");
  return cmock_call_instance->ReturnVal;
}
Beispiel #21
0
qeo_retcode_t reader_user_data_update(const qeocore_reader_t* reader)
{
  UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
  CMOCK_reader_user_data_update_CALL_INSTANCE* cmock_call_instance = (CMOCK_reader_user_data_update_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.reader_user_data_update_CallInstance);
  Mock.reader_user_data_update_CallInstance = CMock_Guts_MemNext(Mock.reader_user_data_update_CallInstance);
  if (Mock.reader_user_data_update_IgnoreBool)
  {
    if (cmock_call_instance == NULL)
      return Mock.reader_user_data_update_FinalReturn;
    memcpy(&Mock.reader_user_data_update_FinalReturn, &cmock_call_instance->ReturnVal, sizeof(qeo_retcode_t));
    return cmock_call_instance->ReturnVal;
  }
  if (Mock.reader_user_data_update_CallbackFunctionPointer != NULL)
  {
    return Mock.reader_user_data_update_CallbackFunctionPointer(reader, Mock.reader_user_data_update_CallbackCalls++);
  }
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "Function 'reader_user_data_update' called more times than expected.");
  cmock_line = cmock_call_instance->LineNumber;
  UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(cmock_call_instance->Expected_reader), (void*)(reader), sizeof(qeocore_reader_t), cmock_line, "Function 'reader_user_data_update' called with unexpected value for argument 'reader'.");
  return cmock_call_instance->ReturnVal;
}
void mock_system_write_impl(S_DATA* dest, S_DATA value)
{
  UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
  UNITY_SET_DETAIL(CMockString_system_write);
  CMOCK_system_write_CALL_INSTANCE* cmock_call_instance = (CMOCK_system_write_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.system_write_CallInstance);
  Mock.system_write_CallInstance = CMock_Guts_MemNext(Mock.system_write_CallInstance);
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringCalledMore);
  cmock_line = cmock_call_instance->LineNumber;
  {
    UNITY_SET_DETAILS(CMockString_system_write,CMockString_dest);
    UNITY_TEST_ASSERT_EQUAL_PTR((void*)(cmock_call_instance->Expected_dest), (void*)(dest), cmock_line, CMockStringMismatch);
  }
  {
    UNITY_SET_DETAILS(CMockString_system_write,CMockString_value);
    UNITY_TEST_ASSERT_EQUAL_HEX32(cmock_call_instance->Expected_value, value, cmock_line, CMockStringMismatch);
    UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(&cmock_call_instance->Expected_value), (void*)(&value), sizeof(S_DATA), cmock_line, CMockStringMismatch);
  }
  UNITY_CLR_DETAILS();
  // Actually write value
  *dest = value;
}
Beispiel #23
0
qeo_retcode_t qeo_security_policy_refresh(qeo_security_policy_hndl qeoSecPol)
{
    UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
    CMOCK_qeo_security_policy_refresh_CALL_INSTANCE* cmock_call_instance = (CMOCK_qeo_security_policy_refresh_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.qeo_security_policy_refresh_CallInstance);
    Mock.qeo_security_policy_refresh_CallInstance = CMock_Guts_MemNext(Mock.qeo_security_policy_refresh_CallInstance);
    if (Mock.qeo_security_policy_refresh_IgnoreBool)
    {
        if (cmock_call_instance == NULL)
            return Mock.qeo_security_policy_refresh_FinalReturn;
        memcpy(&Mock.qeo_security_policy_refresh_FinalReturn, &cmock_call_instance->ReturnVal, sizeof(qeo_retcode_t));
        return cmock_call_instance->ReturnVal;
    }
    if (Mock.qeo_security_policy_refresh_CallbackFunctionPointer != NULL)
    {
        return Mock.qeo_security_policy_refresh_CallbackFunctionPointer(qeoSecPol, Mock.qeo_security_policy_refresh_CallbackCalls++);
    }
    UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "Function 'qeo_security_policy_refresh' called more times than expected.");
    cmock_line = cmock_call_instance->LineNumber;
    UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(&cmock_call_instance->Expected_qeoSecPol), (void*)(&qeoSecPol), sizeof(qeo_security_policy_hndl), cmock_line, "Function 'qeo_security_policy_refresh' called with unexpected value for argument 'qeoSecPol'.");
    return cmock_call_instance->ReturnVal;
}
void evaluate3(char* expression)
{
    UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
    CMOCK_evaluate3_CALL_INSTANCE* cmock_call_instance = (CMOCK_evaluate3_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.evaluate3_CallInstance);
    Mock.evaluate3_CallInstance = CMock_Guts_MemNext(Mock.evaluate3_CallInstance);
    if (Mock.evaluate3_IgnoreBool)
    {
        return;
    }
    if (Mock.evaluate3_CallbackFunctionPointer != NULL)
    {
        Mock.evaluate3_CallbackFunctionPointer(expression, Mock.evaluate3_CallbackCalls++);
        return;
    }
    UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "Function 'evaluate3' called more times than expected.");
    cmock_line = cmock_call_instance->LineNumber;
    if (cmock_call_instance->CallOrder > ++GlobalVerifyOrder)
        UNITY_TEST_FAIL(cmock_line, "Function 'evaluate3' called earlier than expected.");
    if (cmock_call_instance->CallOrder < GlobalVerifyOrder)
        UNITY_TEST_FAIL(cmock_line, "Function 'evaluate3' called later than expected.");
    UNITY_TEST_ASSERT_EQUAL_STRING(cmock_call_instance->Expected_expression, expression, cmock_line, "Function 'evaluate3' called with unexpected value for argument 'expression'.");
}
Beispiel #25
0
qeo_util_retcode_t qeo_platform_set_key_value(const char* key, char* value)
{
  UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
  CMOCK_qeo_platform_set_key_value_CALL_INSTANCE* cmock_call_instance = (CMOCK_qeo_platform_set_key_value_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.qeo_platform_set_key_value_CallInstance);
  Mock.qeo_platform_set_key_value_CallInstance = CMock_Guts_MemNext(Mock.qeo_platform_set_key_value_CallInstance);
  if (Mock.qeo_platform_set_key_value_IgnoreBool)
  {
    if (cmock_call_instance == NULL)
      return Mock.qeo_platform_set_key_value_FinalReturn;
    memcpy(&Mock.qeo_platform_set_key_value_FinalReturn, &cmock_call_instance->ReturnVal, sizeof(qeo_util_retcode_t));
    return cmock_call_instance->ReturnVal;
  }
  if (Mock.qeo_platform_set_key_value_CallbackFunctionPointer != NULL)
  {
    return Mock.qeo_platform_set_key_value_CallbackFunctionPointer(key, value, Mock.qeo_platform_set_key_value_CallbackCalls++);
  }
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "Function 'qeo_platform_set_key_value' called more times than expected.");
  cmock_line = cmock_call_instance->LineNumber;
  UNITY_TEST_ASSERT_EQUAL_STRING(cmock_call_instance->Expected_key, key, cmock_line, "Function 'qeo_platform_set_key_value' called with unexpected value for argument 'key'.");
  UNITY_TEST_ASSERT_EQUAL_STRING(cmock_call_instance->Expected_value, value, cmock_line, "Function 'qeo_platform_set_key_value' called with unexpected value for argument 'value'.");
  return cmock_call_instance->ReturnVal;
}
qeocore_data_t* data_alloc(DDS_DynamicType type, int prep_data)
{
  UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
  CMOCK_data_alloc_CALL_INSTANCE* cmock_call_instance = (CMOCK_data_alloc_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.data_alloc_CallInstance);
  Mock.data_alloc_CallInstance = CMock_Guts_MemNext(Mock.data_alloc_CallInstance);
  if (Mock.data_alloc_IgnoreBool)
  {
    if (cmock_call_instance == NULL)
      return Mock.data_alloc_FinalReturn;
    Mock.data_alloc_FinalReturn = cmock_call_instance->ReturnVal;
    return cmock_call_instance->ReturnVal;
  }
  if (Mock.data_alloc_CallbackFunctionPointer != NULL)
  {
    return Mock.data_alloc_CallbackFunctionPointer(type, prep_data, Mock.data_alloc_CallbackCalls++);
  }
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "Function 'data_alloc' called more times than expected.");
  cmock_line = cmock_call_instance->LineNumber;
  UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(&cmock_call_instance->Expected_type), (void*)(&type), sizeof(DDS_DynamicType), cmock_line, "Function 'data_alloc' called with unexpected value for argument 'type'.");
  UNITY_TEST_ASSERT_EQUAL_INT(cmock_call_instance->Expected_prep_data, prep_data, cmock_line, "Function 'data_alloc' called with unexpected value for argument 'prep_data'.");
  return cmock_call_instance->ReturnVal;
}
Beispiel #27
0
void InitI2C(uint8_t address)
{
  UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
  CMOCK_InitI2C_CALL_INSTANCE* cmock_call_instance = (CMOCK_InitI2C_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.InitI2C_CallInstance);
  Mock.InitI2C_CallInstance = CMock_Guts_MemNext(Mock.InitI2C_CallInstance);
  if (Mock.InitI2C_IgnoreBool)
  {
    return;
  }
  if (Mock.InitI2C_CallbackFunctionPointer != NULL)
  {
    Mock.InitI2C_CallbackFunctionPointer(address, Mock.InitI2C_CallbackCalls++);
    return;
  }
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "Function 'InitI2C' called more times than expected.");
  cmock_line = cmock_call_instance->LineNumber;
  if (cmock_call_instance->CallOrder > ++GlobalVerifyOrder)
    UNITY_TEST_FAIL(cmock_line, "Function 'InitI2C' called earlier than expected.");
  if (cmock_call_instance->CallOrder < GlobalVerifyOrder)
    UNITY_TEST_FAIL(cmock_line, "Function 'InitI2C' called later than expected.");
  UNITY_TEST_ASSERT_EQUAL_HEX8(cmock_call_instance->Expected_address, address, cmock_line, "Function 'InitI2C' called with unexpected value for argument 'address'.");
}
void operatorPush(Token* token)
{
  UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
  CMOCK_operatorPush_CALL_INSTANCE* cmock_call_instance = (CMOCK_operatorPush_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.operatorPush_CallInstance);
  Mock.operatorPush_CallInstance = CMock_Guts_MemNext(Mock.operatorPush_CallInstance);
  if (Mock.operatorPush_IgnoreBool)
  {
    return;
  }
  if (Mock.operatorPush_CallbackFunctionPointer != NULL)
  {
    Mock.operatorPush_CallbackFunctionPointer(token, Mock.operatorPush_CallbackCalls++);
    return;
  }
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "Function 'operatorPush' called more times than expected.");
  cmock_line = cmock_call_instance->LineNumber;
  if (cmock_call_instance->CallOrder > ++GlobalVerifyOrder)
    UNITY_TEST_FAIL(cmock_line, "Function 'operatorPush' called earlier than expected.");
  if (cmock_call_instance->CallOrder < GlobalVerifyOrder)
    UNITY_TEST_FAIL(cmock_line, "Function 'operatorPush' called later than expected.");
  UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(cmock_call_instance->Expected_token), (void*)(token), sizeof(Token), cmock_line, "Function 'operatorPush' called with unexpected value for argument 'token'.");
}
qeo_util_retcode_t qeo_platform_security_remote_registration_confirmation_needed(qeo_platform_security_context_t context, const qeo_platform_security_remote_registration_credentials_t* rrcred, qeo_platform_security_remote_registration_credentials_feedback_cb cb)
{
    UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
    CMOCK_qeo_platform_security_remote_registration_confirmation_needed_CALL_INSTANCE* cmock_call_instance = (CMOCK_qeo_platform_security_remote_registration_confirmation_needed_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.qeo_platform_security_remote_registration_confirmation_needed_CallInstance);
    Mock.qeo_platform_security_remote_registration_confirmation_needed_CallInstance = CMock_Guts_MemNext(Mock.qeo_platform_security_remote_registration_confirmation_needed_CallInstance);
    if (Mock.qeo_platform_security_remote_registration_confirmation_needed_IgnoreBool)
    {
        if (cmock_call_instance == NULL)
            return Mock.qeo_platform_security_remote_registration_confirmation_needed_FinalReturn;
        memcpy(&Mock.qeo_platform_security_remote_registration_confirmation_needed_FinalReturn, &cmock_call_instance->ReturnVal, sizeof(qeo_util_retcode_t));
        return cmock_call_instance->ReturnVal;
    }
    if (Mock.qeo_platform_security_remote_registration_confirmation_needed_CallbackFunctionPointer != NULL)
    {
        return Mock.qeo_platform_security_remote_registration_confirmation_needed_CallbackFunctionPointer(context, rrcred, cb, Mock.qeo_platform_security_remote_registration_confirmation_needed_CallbackCalls++);
    }
    UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "Function 'qeo_platform_security_remote_registration_confirmation_needed' called more times than expected.");
    cmock_line = cmock_call_instance->LineNumber;
    UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(&cmock_call_instance->Expected_context), (void*)(&context), sizeof(qeo_platform_security_context_t), cmock_line, "Function 'qeo_platform_security_remote_registration_confirmation_needed' called with unexpected value for argument 'context'.");
    UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(cmock_call_instance->Expected_rrcred), (void*)(rrcred), sizeof(qeo_platform_security_remote_registration_credentials_t), cmock_line, "Function 'qeo_platform_security_remote_registration_confirmation_needed' called with unexpected value for argument 'rrcred'.");
    UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(&cmock_call_instance->Expected_cb), (void*)(&cb), sizeof(qeo_platform_security_remote_registration_credentials_feedback_cb), cmock_line, "Function 'qeo_platform_security_remote_registration_confirmation_needed' called with unexpected value for argument 'cb'.");
    return cmock_call_instance->ReturnVal;
}
qeo_retcode_t data_set_member(qeocore_data_t* data, qeocore_member_id_t id, const void* value)
{
  UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
  CMOCK_data_set_member_CALL_INSTANCE* cmock_call_instance = (CMOCK_data_set_member_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.data_set_member_CallInstance);
  Mock.data_set_member_CallInstance = CMock_Guts_MemNext(Mock.data_set_member_CallInstance);
  if (Mock.data_set_member_IgnoreBool)
  {
    if (cmock_call_instance == NULL)
      return Mock.data_set_member_FinalReturn;
    memcpy(&Mock.data_set_member_FinalReturn, &cmock_call_instance->ReturnVal, sizeof(qeo_retcode_t));
    return cmock_call_instance->ReturnVal;
  }
  if (Mock.data_set_member_CallbackFunctionPointer != NULL)
  {
    return Mock.data_set_member_CallbackFunctionPointer(data, id, value, Mock.data_set_member_CallbackCalls++);
  }
  UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, "Function 'data_set_member' called more times than expected.");
  cmock_line = cmock_call_instance->LineNumber;
  UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(cmock_call_instance->Expected_data), (void*)(data), sizeof(qeocore_data_t), cmock_line, "Function 'data_set_member' called with unexpected value for argument 'data'.");
  UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(&cmock_call_instance->Expected_id), (void*)(&id), sizeof(qeocore_member_id_t), cmock_line, "Function 'data_set_member' called with unexpected value for argument 'id'.");
  UNITY_TEST_ASSERT_EQUAL_PTR(cmock_call_instance->Expected_value, value, cmock_line, "Function 'data_set_member' called with unexpected value for argument 'value'.");
  return cmock_call_instance->ReturnVal;
}