theCore C++ embedded framework
hm10_unit.cpp File Reference
#include <dev/hm10.hpp>
#include <CppUTest/TestHarness.h>
#include <CppUTest/CommandLineTestRunner.h>
Include dependency graph for hm10_unit.cpp:

Typedefs

using serial_mock_inst = ecl::serial< int >
 
using hm10_sync = ecl::hm10_sync< int >
 

Functions

 TEST_GROUP (hm10_sync_mode)
 
static void do_valid_init ()
 
 TEST (hm10_sync_mode, init)
 
 TEST (hm10_sync_mode, init_partial_resp)
 
 TEST (hm10_sync_mode, init_invalid_resp)
 
 TEST (hm10_sync_mode, init_no_resp)
 
 TEST_GROUP (hm10_sync_mode_cmd)
 
template<typename Runner >
static void hm10_check_command (Runner r, ecl::err exp_ret, const std::string &exp_tx, const std::string &rx)
 
 TEST (hm10_sync_mode_cmd, set_pin)
 
 TEST (hm10_sync_mode_cmd, set_pin_inval)
 
 TEST (hm10_sync_mode_cmd, get_pin)
 
 TEST (hm10_sync_mode_cmd, get_pin_inv_header)
 
 TEST (hm10_sync_mode_cmd, get_pin_inv_pin)
 
 TEST (hm10_sync_mode_cmd, set_imme)
 
 TEST (hm10_sync_mode_cmd, set_imme_inval)
 
 TEST (hm10_sync_mode_cmd, get_imme)
 
 TEST (hm10_sync_mode_cmd, get_imme_inval)
 
 TEST (hm10_sync_mode_cmd, disconnect)
 
 TEST (hm10_sync_mode_cmd, disconnect_inval)
 
int main (int argc, char *argv[])
 

Typedef Documentation

◆ serial_mock_inst

◆ hm10_sync

using hm10_sync = ecl::hm10_sync<int>

Function Documentation

◆ TEST_GROUP() [1/2]

TEST_GROUP ( hm10_sync_mode  )
Here is the call graph for this function:

◆ do_valid_init()

static void do_valid_init ( )
static
Here is the call graph for this function:

◆ TEST() [1/15]

TEST ( hm10_sync_mode  ,
init   
)
Here is the call graph for this function:

◆ TEST() [2/15]

TEST ( hm10_sync_mode  ,
init_partial_resp   
)
Here is the call graph for this function:

◆ TEST() [3/15]

TEST ( hm10_sync_mode  ,
init_invalid_resp   
)
Here is the call graph for this function:

◆ TEST() [4/15]

TEST ( hm10_sync_mode  ,
init_no_resp   
)
Here is the call graph for this function:

◆ TEST_GROUP() [2/2]

TEST_GROUP ( hm10_sync_mode_cmd  )
Here is the call graph for this function:

◆ hm10_check_command()

template<typename Runner >
static void hm10_check_command ( Runner  r,
ecl::err  exp_ret,
const std::string &  exp_tx,
const std::string &  rx 
)
static

◆ TEST() [5/15]

TEST ( hm10_sync_mode_cmd  ,
set_pin   
)
Here is the call graph for this function:

◆ TEST() [6/15]

TEST ( hm10_sync_mode_cmd  ,
set_pin_inval   
)
Here is the call graph for this function:

◆ TEST() [7/15]

TEST ( hm10_sync_mode_cmd  ,
get_pin   
)
Here is the call graph for this function:

◆ TEST() [8/15]

TEST ( hm10_sync_mode_cmd  ,
get_pin_inv_header   
)
Here is the call graph for this function:

◆ TEST() [9/15]

TEST ( hm10_sync_mode_cmd  ,
get_pin_inv_pin   
)
Here is the call graph for this function:

◆ TEST() [10/15]

TEST ( hm10_sync_mode_cmd  ,
set_imme   
)
Here is the call graph for this function:

◆ TEST() [11/15]

TEST ( hm10_sync_mode_cmd  ,
set_imme_inval   
)
Here is the call graph for this function:

◆ TEST() [12/15]

TEST ( hm10_sync_mode_cmd  ,
get_imme   
)
Here is the call graph for this function:

◆ TEST() [13/15]

TEST ( hm10_sync_mode_cmd  ,
get_imme_inval   
)
Here is the call graph for this function:

◆ TEST() [14/15]

TEST ( hm10_sync_mode_cmd  ,
disconnect   
)
Here is the call graph for this function:

◆ TEST() [15/15]

TEST ( hm10_sync_mode_cmd  ,
disconnect_inval   
)
Here is the call graph for this function:

◆ main()

int main ( int  argc,
char *  argv[] 
)