RKH
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
unitrazer.h File Reference

Interface of unit test with Trazer application. More...

#include "unity_fixture.h"
#include "rkh.h"

Go to the source code of this file.

Macros

#define sm_init()   unitrazer_init()
 Establish the preconditions to the tests.
 
#define sm_cleanup()   unitrazer_cleanup()
 Return the system under test to its initial state after the test.
 
#define sm_verify()   unitrazer_verify()
 Makes sure there are no unused expectations, if there are, this function causes the test to fail.
 

Functions

void unitrazer_init (void)
 Establish the preconditions to the tests.
 
void unitrazer_cleanup (void)
 Return the system under test to its initial state after the test.
 
void unitrazer_verify (void)
 Makes sure there are no unused expectations, if there are, this function causes the test to fail.
 
void unitrazer_expect_wSymArg (UNITY_LINE_TYPE cmockLine, RKH_TRC_EVENTS trcEvt, rui8_t nArgs,...)
 Identifies the trace event to expect with one or more arguments. More...
 
void unitrazer_expect_wNumArg (UNITY_LINE_TYPE cmockLine, RKH_TRC_EVENTS trcEvt, rui8_t nArgs,...)
 Identifies the trace event to expect with one or more arguments. More...
 
void unitrazer_expect_wSig (UNITY_LINE_TYPE cmockLine, RKH_TRC_EVENTS trcEvt, RKH_SIG_T signal)
 Identifies the trace event to expect and one signal argument. More...
 
void unitrazer_expect_noArgs (UNITY_LINE_TYPE cmockLine, RKH_TRC_EVENTS trcEvt)
 Identifies the trace event to expect without arguments. More...
 
void unitrazer_expectAnyArgs (UNITY_LINE_TYPE cmockLine, rui8_t trcEvt)
 Expect a specific trace event regardless its arguments. More...
 
void unitrazer_sm_exeAct_expect (UNITY_LINE_TYPE cmockLine, rui8_t actType, RKH_ST_T *state, void *action)
 Expect for RKH_TE_SM_EXE_ACT trace event. More...
 
void unitrazer_ignore (UNITY_LINE_TYPE cmockLine, rui8_t trcEvt)
 Ignore a specific trace event. More...
 
void unitrazer_ignoreArg (UNITY_LINE_TYPE cmockLine, rui8_t trcEvt, rui8_t noArg)
 Adds the ability to specify specifc arguments to ignore for a produced trace event, instead of ignoring all the arguments or the entire generated trace event, as the unitrazer_ignore() function supports. More...
 
void unitrazer_ignoreGroup (UNITY_LINE_TYPE cmockLine, RKH_TRC_GROUPS group)
 Force to ignore every produced trace event from a specifc trace group. More...
 

Detailed Description

Interface of unit test with Trazer application.

Definition in file unitrazer.h.

Function Documentation

void unitrazer_expect_wSymArg ( UNITY_LINE_TYPE  cmockLine,
RKH_TRC_EVENTS  trcEvt,
rui8_t  nArgs,
  ... 
)

Identifies the trace event to expect with one or more arguments.

Parameters
[in]cmockLineline number from which this function is called
[in]trcEvttrace event to expect
[in]nArgsnumber of trace event arguments
[in]...list of arguments
Note
This function is internal to RKH and the user application should not call it. Instead, use the corresponding macro for the trace event to expect.
void unitrazer_expect_wNumArg ( UNITY_LINE_TYPE  cmockLine,
RKH_TRC_EVENTS  trcEvt,
rui8_t  nArgs,
  ... 
)

Identifies the trace event to expect with one or more arguments.

Parameters
[in]cmockLineline number from which this function is called
[in]trcEvttrace event to expect
[in]nArgsnumber of trace event arguments
[in]...list of arguments
Note
This function is internal to RKH and the user application should not call it. Instead, use the corresponding macro for the trace event to expect.
void unitrazer_expect_wSig ( UNITY_LINE_TYPE  cmockLine,
RKH_TRC_EVENTS  trcEvt,
RKH_SIG_T  signal 
)

Identifies the trace event to expect and one signal argument.

Parameters
[in]cmockLineline number from which this function is called
[in]trcEvttrace event to expect
[in]signalargument of trace event with signal
Note
This function is internal to RKH and the user application should not call it. Instead, use the corresponding macro for the trace event to expect.
void unitrazer_expect_noArgs ( UNITY_LINE_TYPE  cmockLine,
RKH_TRC_EVENTS  trcEvt 
)

Identifies the trace event to expect without arguments.

Parameters
[in]cmockLineline number from which this function is called
[in]trcEvttrace event to expect
Note
This function is internal to RKH and the user application should not call it. Instead, use the corresponding macro for the trace event to expect.
void unitrazer_expectAnyArgs ( UNITY_LINE_TYPE  cmockLine,
rui8_t  trcEvt 
)

Expect a specific trace event regardless its arguments.

Parameters
[in]cmockLineline number from which this function is called
[in]trcEvtproduced trace event to expect but it ignores its arguments
Note
This function is internal to RKH and the user application should not call it. Instead, use the corresponding macro for the trace event to expect.
void unitrazer_sm_exeAct_expect ( UNITY_LINE_TYPE  cmockLine,
rui8_t  actType,
RKH_ST_T state,
void *  action 
)

Expect for RKH_TE_SM_EXE_ACT trace event.

Parameters
[in]cmockLineline number from which this function is called
[in]actTypeaction type according to RKH_SUBTE_SM_EXE_ACT enum
[in]stateaction execution context
[in]actionexecuted action
Note
This function is internal to RKH and the user application should not call it. Instead, use the corresponding macro for the trace event to expect.
void unitrazer_ignore ( UNITY_LINE_TYPE  cmockLine,
rui8_t  trcEvt 
)

Ignore a specific trace event.

Parameters
[in]cmockLineline number from which this function is called
[in]trcEvtproduced trace event to ignore
Note
This function is internal to RKH and the user application should not call it. Instead, use the corresponding macro for the trace event to ignore.
void unitrazer_ignoreArg ( UNITY_LINE_TYPE  cmockLine,
rui8_t  trcEvt,
rui8_t  noArg 
)

Adds the ability to specify specifc arguments to ignore for a produced trace event, instead of ignoring all the arguments or the entire generated trace event, as the unitrazer_ignore() function supports.

Parameters
[in]cmockLineline number from which this function is called
[in]trcEvtproduced trace event to expect
[in]noArgnumber of argument to ignore. See UT_ARGNO_<x> macro.
Note
This function is internal to RKH and the user application should not call it. Instead, use the corresponding macro for the trace event to ignore.
void unitrazer_ignoreGroup ( UNITY_LINE_TYPE  cmockLine,
RKH_TRC_GROUPS  group 
)

Force to ignore every produced trace event from a specifc trace group.

Parameters
[in]cmockLineline number from which this function is called
[in]groupgroup to ignore
Note
This function is internal to RKH and the user application should not call it. Instead, use the corresponding macro for the trace event group to ignore.