Co-Simulation/Sumo/sumo-1.7.0/unittest/src/utils/common/RandHelperTest.cpp
/* Test whether the 'rand' sequence is always the same.*/
Test whether the 'rand' sequence is always the same.
Test whether the ' rand ' sequence is always the same .
TEST(RandHelper, test_sequence) {
    RandHelper::initRand();
    int expect[] = { 46, 17, 19, 75, 11, 42, 28, 22, 77, 11 };
    for (int i = 0; i < 10; i++) {
        EXPECT_EQ(expect[i], RandHelper::rand(100));
    }
}
TEST ( RandHelper , test_sequence ) { RandHelper :: initRand ( ) ; int expect [ ] = { 46 , 17 , 19 , 75 , 11 , 42 , 28 , 22 , 77 , 11 } ; for ( int i = 0 ; i < 10 ; i ++ ) { EXPECT_EQ ( expect [ i ] , RandHelper :: rand ( 100 ) ) ; } }
Test whether the 'rand' sequence is always the same.
Test whether the ' rand ' sequence is always the same .