fixed

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 40d86c61
......@@ -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));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment