The suite specific header should only be used when the suite is active

This commit is contained in:
Paul Bakker 2013-09-15 17:05:21 +02:00
parent 4606c7317b
commit de56ca1097
2 changed files with 8 additions and 5 deletions

View File

@ -61,7 +61,9 @@ open(TEST_FILE, ">$test_file") or die "Opening destination file '$test_file': $!
print TEST_FILE << "END"; print TEST_FILE << "END";
#include <polarssl/config.h> #include <polarssl/config.h>
$suite_pre_code
$suite_header $suite_header
$suite_post_code
$test_helpers $test_helpers

View File

@ -3,6 +3,9 @@
static int test_errors = 0; static int test_errors = 0;
SUITE_PRE_DEP
#define TEST_SUITE_ACTIVE
static int test_assert( int correct, char *test ) static int test_assert( int correct, char *test )
{ {
if( correct ) if( correct )
@ -81,6 +84,9 @@ MAPPING_CODE
return( -1 ); return( -1 );
} }
FUNCTION_CODE
SUITE_POST_DEP
int dep_check( char *str ) int dep_check( char *str )
{ {
if( str == NULL ) if( str == NULL )
@ -91,11 +97,6 @@ DEP_CHECK_CODE
return( 1 ); return( 1 );
} }
SUITE_PRE_DEP
#define TEST_SUITE_ACTIVE
FUNCTION_CODE
SUITE_POST_DEP
int dispatch_test(int cnt, char *params[50]) int dispatch_test(int cnt, char *params[50])
{ {
int ret; int ret;