Reviewers: Søren Gjesse,
Description:
Fix Win build: use floor(x + 0.5) instead of round(x).
It appears that VC doesn't have 'round' in math.
[email protected]
Please review this at http://codereview.chromium.org/2874011/show
Affected files:
M test/cctest/test-profile-generator.cc
Index: test/cctest/test-profile-generator.cc
diff --git a/test/cctest/test-profile-generator.cc
b/test/cctest/test-profile-generator.cc
index
b0a9b8e71544c47072c17703331a3cc75e52af8f..ea477de661b788e48a6ffa91251f6bd0b496de1d
100644
--- a/test/cctest/test-profile-generator.cc
+++ b/test/cctest/test-profile-generator.cc
@@ -653,7 +653,7 @@ TEST(SampleRateCalculator) {
time += SampleRateCalculator::kWallTimeQueryIntervalMs * 0.75;
calc2.UpdateMeasurements(time);
// (1.0 + 2.0 + 2.0) / 3
- CHECK_EQ(kSamplingIntervalMs * 5.0, round(calc2.ticks_per_ms() * 3.0));
+ CHECK_EQ(kSamplingIntervalMs * 5.0, floor(calc2.ticks_per_ms() * 3.0 +
0.5));
SampleRateCalculator calc3;
time = 0.0;
@@ -667,7 +667,7 @@ TEST(SampleRateCalculator) {
time += SampleRateCalculator::kWallTimeQueryIntervalMs * 1.5;
calc3.UpdateMeasurements(time);
// (1.0 + 0.5 + 0.5) / 3
- CHECK_EQ(kSamplingIntervalMs * 2.0, round(calc3.ticks_per_ms() * 3.0));
+ CHECK_EQ(kSamplingIntervalMs * 2.0, floor(calc3.ticks_per_ms() * 3.0 +
0.5));
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev