Co-Simulation/Sumo/sumo-1.7.0/unittest/src/utils/common/RandHelperTest.cpp
/* Test the method 'rand' with two float limits.*/
Test the method 'rand' with two float limits.
Test the method ' rand ' with two float limits .
TEST(RandHelper, test_rand_range_two_float) {
    for (int i = 0; i < 1000; i++) {
        const double rand = RandHelper::rand(double(0.1), double(0.5));
        EXPECT_LT(rand, double(0.5));
        EXPECT_LE(double(0.1), rand);
    }
}
TEST ( RandHelper , test_rand_range_two_float ) { for ( int i = 0 ; i < 1000 ; i ++ ) { const double rand = RandHelper :: rand ( double ( 0.1 ) , double ( 0.5 ) ) ; EXPECT_LT ( rand , double ( 0.5 ) ) ; EXPECT_LE ( double ( 0.1 ) , rand ) ; } }
Test the method 'rand' with two float limits.
Test the method ' rand ' with two float limits .