diff --git a/tests/scripts/generate_code.pl b/tests/scripts/generate_code.pl index 40f993ff8..1e33ac612 100755 --- a/tests/scripts/generate_code.pl +++ b/tests/scripts/generate_code.pl @@ -61,7 +61,9 @@ open(TEST_FILE, ">$test_file") or die "Opening destination file '$test_file': $! print TEST_FILE << "END"; #include +$suite_pre_code $suite_header +$suite_post_code $test_helpers diff --git a/tests/suites/main_test.function b/tests/suites/main_test.function index 4a343190b..d5aa3862c 100644 --- a/tests/suites/main_test.function +++ b/tests/suites/main_test.function @@ -3,6 +3,9 @@ static int test_errors = 0; +SUITE_PRE_DEP +#define TEST_SUITE_ACTIVE + static int test_assert( int correct, char *test ) { if( correct ) @@ -81,6 +84,9 @@ MAPPING_CODE return( -1 ); } +FUNCTION_CODE +SUITE_POST_DEP + int dep_check( char *str ) { if( str == NULL ) @@ -91,11 +97,6 @@ DEP_CHECK_CODE return( 1 ); } -SUITE_PRE_DEP -#define TEST_SUITE_ACTIVE -FUNCTION_CODE -SUITE_POST_DEP - int dispatch_test(int cnt, char *params[50]) { int ret;