| Index: test/cctest/test-strtod.cc
|
| diff --git a/test/cctest/test-strtod.cc b/test/cctest/test-strtod.cc
|
| index 952f57cf3b99a0d6a5b7002b9c3dde20e0647d1d..e7d85766ea9c327fa1bf5290d87c99dcf0d21cc1 100644
|
| --- a/test/cctest/test-strtod.cc
|
| +++ b/test/cctest/test-strtod.cc
|
| @@ -432,7 +432,7 @@ static uint32_t DeterministicRandom() {
|
| static uint32_t lo = 0;
|
|
|
| // Initialization values don't have any special meaning. (They are the result
|
| - // of two calls to random().)
|
| + // of two calls to rand().)
|
| if (hi == 0) hi = 0xbfe166e7;
|
| if (lo == 0) lo = 0x64d1c3c9;
|
|
|
| @@ -448,12 +448,13 @@ static const int kShortStrtodRandomCount = 2;
|
| static const int kLargeStrtodRandomCount = 2;
|
|
|
| TEST(RandomStrtod) {
|
| + srand(time(NULL));
|
| char buffer[kBufferSize];
|
| for (int length = 1; length < 15; length++) {
|
| for (int i = 0; i < kShortStrtodRandomCount; ++i) {
|
| int pos = 0;
|
| for (int j = 0; j < length; ++j) {
|
| - buffer[pos++] = random() % 10 + '0';
|
| + buffer[pos++] = rand() % 10 + '0';
|
| }
|
| int exponent = DeterministicRandom() % (25*2 + 1) - 25 - length;
|
| buffer[pos] = '\0';
|
| @@ -466,7 +467,7 @@ TEST(RandomStrtod) {
|
| for (int i = 0; i < kLargeStrtodRandomCount; ++i) {
|
| int pos = 0;
|
| for (int j = 0; j < length; ++j) {
|
| - buffer[pos++] = random() % 10 + '0';
|
| + buffer[pos++] = rand() % 10 + '0';
|
| }
|
| int exponent = DeterministicRandom() % (308*2 + 1) - 308 - length;
|
| buffer[pos] = '\0';
|
|
|