1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-03 18:25:35 +00:00

add a unit test to exercise tr_cryptoRandInt()

This commit is contained in:
Charles Kerr 2008-09-06 02:04:37 +00:00
parent abd98feaae
commit 7944e7c608

View file

@ -138,6 +138,13 @@ main( void )
if(( i = test_strstrip( )))
return i;
/* test that tr_cryptoRandInt() stays in-bounds */
for( i=0; i<100000; ++i ) {
const int val = tr_cryptoRandInt( 100 );
check( i >= 0 );
check( i < 100 );
}
/* simple bitfield tests */
for( l=0; l<NUM_LOOPS; ++l )
if(( i = test_bitfields( )))