Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(502)

Unified Diff: test/unittests/heap/gc-tracer-unittest.cc

Issue 1841043002: Represent speed in GCTracer functions as double instead of int. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/unittests/heap/gc-idle-time-handler-unittest.cc ('k') | test/unittests/heap/scavenge-job-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/heap/gc-tracer-unittest.cc
diff --git a/test/unittests/heap/gc-tracer-unittest.cc b/test/unittests/heap/gc-tracer-unittest.cc
index b57d4a6e2453e6018fdbbc570c98e148caaa99d2..2bf4d037d3ba4eaaee8975458e3d7224c54ec992 100644
--- a/test/unittests/heap/gc-tracer-unittest.cc
+++ b/test/unittests/heap/gc-tracer-unittest.cc
@@ -37,11 +37,11 @@ TEST(GCTracer, AverageSpeed) {
buffer.Push(MakeBytesAndDuration(i + 1, 1));
}
EXPECT_EQ(
- static_cast<int>(sum * 1.0 / buffer.kSize + 0.5),
+ sum * 1.0 / buffer.kSize,
GCTracer::AverageSpeed(buffer, MakeBytesAndDuration(0, 0), buffer.kSize));
buffer.Push(MakeBytesAndDuration(100, 1));
EXPECT_EQ(
- static_cast<int>((sum * 1.0 - 1 + 100) / buffer.kSize + 0.5),
+ (sum * 1.0 - 1 + 100) / buffer.kSize,
GCTracer::AverageSpeed(buffer, MakeBytesAndDuration(0, 0), buffer.kSize));
}
« no previous file with comments | « test/unittests/heap/gc-idle-time-handler-unittest.cc ('k') | test/unittests/heap/scavenge-job-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698