text: /* AUTOGENERATED FILE. DO NOT EDIT. */
  #include <string.h>
  #include <stdlib.h>
  #include <setjmp.h>
  #include "unity.h"
  #include "cmock.h"
  #include "Mock_rkhtrc_stream.h"
  
  static const char* CMockString_b = "b";
  static const char* CMockString_nget = "nget";
  static const char* CMockString_rkh_trcStream_init = "rkh_trcStream_init";
  static const char* CMockString_rkh_trc_get = "rkh_trc_get";
  static const char* CMockString_rkh_trc_get_block = "rkh_trc_get_block";
  static const char* CMockString_rkh_trc_put = "rkh_trc_put";
  
  typedef struct _CMOCK_rkh_trcStream_init_CALL_INSTANCE
  {
    UNITY_LINE_TYPE LineNumber;
  
  } CMOCK_rkh_trcStream_init_CALL_INSTANCE;
  
  typedef struct _CMOCK_rkh_trc_get_CALL_INSTANCE
  {
    UNITY_LINE_TYPE LineNumber;
    rui8_t* ReturnVal;
  
  } CMOCK_rkh_trc_get_CALL_INSTANCE;
  
  typedef struct _CMOCK_rkh_trc_get_block_CALL_INSTANCE
  {
    UNITY_LINE_TYPE LineNumber;
    rui8_t* ReturnVal;
    TRCQTY_T* Expected_nget;
    int IgnoreArg_nget;
  
  } CMOCK_rkh_trc_get_block_CALL_INSTANCE;
  
  typedef struct _CMOCK_rkh_trc_put_CALL_INSTANCE
  {
    UNITY_LINE_TYPE LineNumber;
    rui8_t Expected_b;
    int IgnoreArg_b;
  
  } CMOCK_rkh_trc_put_CALL_INSTANCE;
  
  static struct Mock_rkhtrc_streamInstance
  {
    int rkh_trcStream_init_IgnoreBool;
    CMOCK_MEM_INDEX_TYPE rkh_trcStream_init_CallInstance;
    int rkh_trc_get_IgnoreBool;
    rui8_t* rkh_trc_get_FinalReturn;
    CMOCK_MEM_INDEX_TYPE rkh_trc_get_CallInstance;
    int rkh_trc_get_block_IgnoreBool;
    rui8_t* rkh_trc_get_block_FinalReturn;
    CMOCK_MEM_INDEX_TYPE rkh_trc_get_block_CallInstance;
    int rkh_trc_put_IgnoreBool;
    CMOCK_MEM_INDEX_TYPE rkh_trc_put_CallInstance;
  } Mock;
  
  extern jmp_buf AbortFrame;
  
  void Mock_rkhtrc_stream_Verify(void)
  {
    UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
    if (Mock.rkh_trcStream_init_IgnoreBool)
      Mock.rkh_trcStream_init_CallInstance = CMOCK_GUTS_NONE;
    UNITY_SET_DETAIL(CMockString_rkh_trcStream_init);
    UNITY_TEST_ASSERT(CMOCK_GUTS_NONE == Mock.rkh_trcStream_init_CallInstance, cmock_line, CMockStringCalledLess);
    if (Mock.rkh_trc_get_IgnoreBool)
      Mock.rkh_trc_get_CallInstance = CMOCK_GUTS_NONE;
    UNITY_SET_DETAIL(CMockString_rkh_trc_get);
    UNITY_TEST_ASSERT(CMOCK_GUTS_NONE == Mock.rkh_trc_get_CallInstance, cmock_line, CMockStringCalledLess);
    if (Mock.rkh_trc_get_block_IgnoreBool)
      Mock.rkh_trc_get_block_CallInstance = CMOCK_GUTS_NONE;
    UNITY_SET_DETAIL(CMockString_rkh_trc_get_block);
    UNITY_TEST_ASSERT(CMOCK_GUTS_NONE == Mock.rkh_trc_get_block_CallInstance, cmock_line, CMockStringCalledLess);
    if (Mock.rkh_trc_put_IgnoreBool)
      Mock.rkh_trc_put_CallInstance = CMOCK_GUTS_NONE;
    UNITY_SET_DETAIL(CMockString_rkh_trc_put);
    UNITY_TEST_ASSERT(CMOCK_GUTS_NONE == Mock.rkh_trc_put_CallInstance, cmock_line, CMockStringCalledLess);
  }
  
  void Mock_rkhtrc_stream_Init(void)
  {
    Mock_rkhtrc_stream_Destroy();
  }
  
  void Mock_rkhtrc_stream_Destroy(void)
  {
    CMock_Guts_MemFreeAll();
    memset(&Mock, 0, sizeof(Mock));
  }
  
  void rkh_trcStream_init(void)
  {
    UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
    CMOCK_rkh_trcStream_init_CALL_INSTANCE* cmock_call_instance;
    UNITY_SET_DETAIL(CMockString_rkh_trcStream_init);
    cmock_call_instance = (CMOCK_rkh_trcStream_init_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.rkh_trcStream_init_CallInstance);
    Mock.rkh_trcStream_init_CallInstance = CMock_Guts_MemNext(Mock.rkh_trcStream_init_CallInstance);
    if (Mock.rkh_trcStream_init_IgnoreBool)
    {
      UNITY_CLR_DETAILS();
      return;
    }
    UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringCalledMore);
    cmock_line = cmock_call_instance->LineNumber;
    UNITY_CLR_DETAILS();
  }
  
  void rkh_trcStream_init_CMockIgnore(void)
  {
    Mock.rkh_trcStream_init_IgnoreBool = (int)1;
  }
  
  void rkh_trcStream_init_CMockExpect(UNITY_LINE_TYPE cmock_line)
  {
    CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_rkh_trcStream_init_CALL_INSTANCE));
    CMOCK_rkh_trcStream_init_CALL_INSTANCE* cmock_call_instance = (CMOCK_rkh_trcStream_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.rkh_trcStream_init_CallInstance = CMock_Guts_MemChain(Mock.rkh_trcStream_init_CallInstance, cmock_guts_index);
    Mock.rkh_trcStream_init_IgnoreBool = (int)0;
    cmock_call_instance->LineNumber = cmock_line;
    UNITY_CLR_DETAILS();
  }
  
  rui8_t* rkh_trc_get(void)
  {
    UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
    CMOCK_rkh_trc_get_CALL_INSTANCE* cmock_call_instance;
    UNITY_SET_DETAIL(CMockString_rkh_trc_get);
    cmock_call_instance = (CMOCK_rkh_trc_get_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.rkh_trc_get_CallInstance);
    Mock.rkh_trc_get_CallInstance = CMock_Guts_MemNext(Mock.rkh_trc_get_CallInstance);
    if (Mock.rkh_trc_get_IgnoreBool)
    {
      UNITY_CLR_DETAILS();
      if (cmock_call_instance == NULL)
        return Mock.rkh_trc_get_FinalReturn;
      Mock.rkh_trc_get_FinalReturn = cmock_call_instance->ReturnVal;
      return cmock_call_instance->ReturnVal;
    }
    UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringCalledMore);
    cmock_line = cmock_call_instance->LineNumber;
    UNITY_CLR_DETAILS();
    return cmock_call_instance->ReturnVal;
  }
  
  void rkh_trc_get_CMockIgnoreAndReturn(UNITY_LINE_TYPE cmock_line, rui8_t* cmock_to_return)
  {
    CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_rkh_trc_get_CALL_INSTANCE));
    CMOCK_rkh_trc_get_CALL_INSTANCE* cmock_call_instance = (CMOCK_rkh_trc_get_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.rkh_trc_get_CallInstance = CMock_Guts_MemChain(Mock.rkh_trc_get_CallInstance, cmock_guts_index);
    Mock.rkh_trc_get_IgnoreBool = (int)0;
    cmock_call_instance->LineNumber = cmock_line;
    cmock_call_instance->ReturnVal = cmock_to_return;
    Mock.rkh_trc_get_IgnoreBool = (int)1;
  }
  
  void rkh_trc_get_CMockExpectAndReturn(UNITY_LINE_TYPE cmock_line, rui8_t* cmock_to_return)
  {
    CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_rkh_trc_get_CALL_INSTANCE));
    CMOCK_rkh_trc_get_CALL_INSTANCE* cmock_call_instance = (CMOCK_rkh_trc_get_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.rkh_trc_get_CallInstance = CMock_Guts_MemChain(Mock.rkh_trc_get_CallInstance, cmock_guts_index);
    Mock.rkh_trc_get_IgnoreBool = (int)0;
    cmock_call_instance->LineNumber = cmock_line;
    cmock_call_instance->ReturnVal = cmock_to_return;
    UNITY_CLR_DETAILS();
  }
  
  rui8_t* rkh_trc_get_block(TRCQTY_T* nget)
  {
    UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
    CMOCK_rkh_trc_get_block_CALL_INSTANCE* cmock_call_instance;
    UNITY_SET_DETAIL(CMockString_rkh_trc_get_block);
    cmock_call_instance = (CMOCK_rkh_trc_get_block_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.rkh_trc_get_block_CallInstance);
    Mock.rkh_trc_get_block_CallInstance = CMock_Guts_MemNext(Mock.rkh_trc_get_block_CallInstance);
    if (Mock.rkh_trc_get_block_IgnoreBool)
    {
      UNITY_CLR_DETAILS();
      if (cmock_call_instance == NULL)
        return Mock.rkh_trc_get_block_FinalReturn;
      Mock.rkh_trc_get_block_FinalReturn = cmock_call_instance->ReturnVal;
      return cmock_call_instance->ReturnVal;
    }
    UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringCalledMore);
    cmock_line = cmock_call_instance->LineNumber;
    if (!cmock_call_instance->IgnoreArg_nget)
    {
      UNITY_SET_DETAILS(CMockString_rkh_trc_get_block,CMockString_nget);
      UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(cmock_call_instance->Expected_nget), (void*)(nget), sizeof(TRCQTY_T), cmock_line, CMockStringMismatch);
    }
    UNITY_CLR_DETAILS();
    return cmock_call_instance->ReturnVal;
  }
  
  void CMockExpectParameters_rkh_trc_get_block(CMOCK_rkh_trc_get_block_CALL_INSTANCE* cmock_call_instance, TRCQTY_T* nget)
  {
    cmock_call_instance->Expected_nget = nget;
    cmock_call_instance->IgnoreArg_nget = 0;
  }
  
  void rkh_trc_get_block_CMockIgnoreAndReturn(UNITY_LINE_TYPE cmock_line, rui8_t* cmock_to_return)
  {
    CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_rkh_trc_get_block_CALL_INSTANCE));
    CMOCK_rkh_trc_get_block_CALL_INSTANCE* cmock_call_instance = (CMOCK_rkh_trc_get_block_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.rkh_trc_get_block_CallInstance = CMock_Guts_MemChain(Mock.rkh_trc_get_block_CallInstance, cmock_guts_index);
    Mock.rkh_trc_get_block_IgnoreBool = (int)0;
    cmock_call_instance->LineNumber = cmock_line;
    cmock_call_instance->ReturnVal = cmock_to_return;
    Mock.rkh_trc_get_block_IgnoreBool = (int)1;
  }
  
  void rkh_trc_get_block_CMockExpectAndReturn(UNITY_LINE_TYPE cmock_line, TRCQTY_T* nget, rui8_t* cmock_to_return)
  {
    CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_rkh_trc_get_block_CALL_INSTANCE));
    CMOCK_rkh_trc_get_block_CALL_INSTANCE* cmock_call_instance = (CMOCK_rkh_trc_get_block_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.rkh_trc_get_block_CallInstance = CMock_Guts_MemChain(Mock.rkh_trc_get_block_CallInstance, cmock_guts_index);
    Mock.rkh_trc_get_block_IgnoreBool = (int)0;
    cmock_call_instance->LineNumber = cmock_line;
    CMockExpectParameters_rkh_trc_get_block(cmock_call_instance, nget);
    cmock_call_instance->ReturnVal = cmock_to_return;
    UNITY_CLR_DETAILS();
  }
  
  void rkh_trc_get_block_CMockIgnoreArg_nget(UNITY_LINE_TYPE cmock_line)
  {
    CMOCK_rkh_trc_get_block_CALL_INSTANCE* cmock_call_instance = (CMOCK_rkh_trc_get_block_CALL_INSTANCE*)CMock_Guts_GetAddressFor(CMock_Guts_MemEndOfChain(Mock.rkh_trc_get_block_CallInstance));
    UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringIgnPreExp);
    cmock_call_instance->IgnoreArg_nget = 1;
  }
  
  void rkh_trc_put(rui8_t b)
  {
    UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;
    CMOCK_rkh_trc_put_CALL_INSTANCE* cmock_call_instance;
    UNITY_SET_DETAIL(CMockString_rkh_trc_put);
    cmock_call_instance = (CMOCK_rkh_trc_put_CALL_INSTANCE*)CMock_Guts_GetAddressFor(Mock.rkh_trc_put_CallInstance);
    Mock.rkh_trc_put_CallInstance = CMock_Guts_MemNext(Mock.rkh_trc_put_CallInstance);
    if (Mock.rkh_trc_put_IgnoreBool)
    {
      UNITY_CLR_DETAILS();
      return;
    }
    UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringCalledMore);
    cmock_line = cmock_call_instance->LineNumber;
    if (!cmock_call_instance->IgnoreArg_b)
    {
      UNITY_SET_DETAILS(CMockString_rkh_trc_put,CMockString_b);
      UNITY_TEST_ASSERT_EQUAL_MEMORY((void*)(&cmock_call_instance->Expected_b), (void*)(&b), sizeof(rui8_t), cmock_line, CMockStringMismatch);
    }
    UNITY_CLR_DETAILS();
  }
  
  void CMockExpectParameters_rkh_trc_put(CMOCK_rkh_trc_put_CALL_INSTANCE* cmock_call_instance, rui8_t b)
  {
    memcpy(&cmock_call_instance->Expected_b, &b, sizeof(rui8_t));
    cmock_call_instance->IgnoreArg_b = 0;
  }
  
  void rkh_trc_put_CMockIgnore(void)
  {
    Mock.rkh_trc_put_IgnoreBool = (int)1;
  }
  
  void rkh_trc_put_CMockExpect(UNITY_LINE_TYPE cmock_line, rui8_t b)
  {
    CMOCK_MEM_INDEX_TYPE cmock_guts_index = CMock_Guts_MemNew(sizeof(CMOCK_rkh_trc_put_CALL_INSTANCE));
    CMOCK_rkh_trc_put_CALL_INSTANCE* cmock_call_instance = (CMOCK_rkh_trc_put_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.rkh_trc_put_CallInstance = CMock_Guts_MemChain(Mock.rkh_trc_put_CallInstance, cmock_guts_index);
    Mock.rkh_trc_put_IgnoreBool = (int)0;
    cmock_call_instance->LineNumber = cmock_line;
    CMockExpectParameters_rkh_trc_put(cmock_call_instance, b);
    UNITY_CLR_DETAILS();
  }
  
  void rkh_trc_put_CMockIgnoreArg_b(UNITY_LINE_TYPE cmock_line)
  {
    CMOCK_rkh_trc_put_CALL_INSTANCE* cmock_call_instance = (CMOCK_rkh_trc_put_CALL_INSTANCE*)CMock_Guts_GetAddressFor(CMock_Guts_MemEndOfChain(Mock.rkh_trc_put_CallInstance));
    UNITY_TEST_ASSERT_NOT_NULL(cmock_call_instance, cmock_line, CMockStringIgnPreExp);
    cmock_call_instance->IgnoreArg_b = 1;
  }
  
  