Creating additional C-interface routines for UnitTest. #511

This commit is contained in:
Pappy Van Winkle 2018-02-03 19:42:17 -06:00
parent 27d18f07f3
commit d7e8d48a8a
2 changed files with 22 additions and 0 deletions

View File

@ -80,6 +80,13 @@
#ifdef __cplusplus
extern "C" {
#endif
int trick_test_enable() ;
int trick_test_set_file_name( const char * in_file_name ) ;
int trick_test_set_test_name( const char * in_test_name ) ;
int trick_test_add_parent(const char * in_test_suite_name,
const char * in_test_case,
const char * par_num ) ;

View File

@ -6,6 +6,21 @@
extern Trick::UnitTest * the_unit_test_output ;
extern "C" int trick_test_enable() {
the_unit_test_output->enable() ;
return(0) ;
}
extern "C" int trick_test_set_file_name( const char * in_file_name ) {
the_unit_test_output->set_file_name(in_file_name) ;
return(0) ;
}
extern "C" int trick_test_set_test_name( const char * in_test_name ) {
the_unit_test_output->set_test_name(in_test_name) ;
return(0) ;
}
extern "C" int add_test_result( const char * in_test_suite_name , const char * in_test_case , const char * in_failure_string ) {
if ( in_failure_string == NULL ) {
in_failure_string = "" ;