Merge pull request from pappyvw/ci-interface-unittest

Creating additional C-interface routines for UnitTest. 
This commit is contained in:
Alex Lin 2018-02-05 17:26:01 -06:00 committed by GitHub
commit f4b4d00ac8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 0 deletions
include/trick
trick_source/sim_services/UnitTest

@ -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 ) ;

@ -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 = "" ;