#include /* fprintf */ #include /* strcmp */ #include "transmission.h" #include "utils.h" #define VERBOSE 0 #define NUM_LOOPS 1 #define SPEED_TEST 0 #if SPEED_TEST #undef VERBOSE #define VERBOSE 0 #undef NUM_LOOPS #define NUM_LOOPS 200 #endif int test = 0; #define check(A) { \ ++test; \ if (A) { \ if( VERBOSE ) \ fprintf( stderr, "PASS test #%d (%s, %d)\n", test, __FILE__, __LINE__ ); \ } else { \ if( VERBOSE ) \ fprintf( stderr, "FAIL test #%d (%s, %d)\n", test, __FILE__, __LINE__ ); \ return test; \ } \ } static int test_bitfields( void ) { int i; int bitcount = 5000000; tr_bitfield * field = tr_bitfieldNew( bitcount ); /* make every seventh one true */ for( i=0; i