fixed
authormikhail.naganov@gmail.com <mikhail.naganov@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 24 Jun 2010 10:05:57 +0000 (10:05 +0000)
committermikhail.naganov@gmail.com <mikhail.naganov@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 24 Jun 2010 10:05:57 +0000 (10:05 +0000)
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4935 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

test/cctest/test-profile-generator.cc

index b0a9b8e71544c47072c17703331a3cc75e52af8f..ea477de661b788e48a6ffa91251f6bd0b496de1d 100644 (file)
@@ -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));
 }