Changeset 6721


Ignore:
Timestamp:
Sep 6, 2008, 2:04:37 AM (13 years ago)
Author:
charles
Message:

add a unit test to exercise tr_cryptoRandInt()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/utils-test.c

    r6717 r6721  
    139139        return i;
    140140
     141    /* test that tr_cryptoRandInt() stays in-bounds */
     142    for( i=0; i<100000; ++i ) {
     143        const int val = tr_cryptoRandInt( 100 );
     144        check( i >= 0 );
     145        check( i < 100 );
     146    }
     147
    141148    /* simple bitfield tests */
    142149    for( l=0; l<NUM_LOOPS; ++l )
Note: See TracChangeset for help on using the changeset viewer.