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

Unified Diff: runtime/vm/zone_test.cc

Issue 2570763002: Fixed bad calculations for determining total allocated size of a zone. (Closed)
Patch Set: Created 4 years 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 | « runtime/vm/zone.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/zone_test.cc
diff --git a/runtime/vm/zone_test.cc b/runtime/vm/zone_test.cc
index c239320179c897f94f1bf1693ac3ea57bd17e2ab..38726ad0cc8aec955722878aed60dfdc2fb1b83f 100644
--- a/runtime/vm/zone_test.cc
+++ b/runtime/vm/zone_test.cc
@@ -201,7 +201,8 @@ UNIT_TEST_CASE(PrintZoneMemoryInfoToJSON) {
OS::SCreate(string_stack_zone.GetZone(), "\"capacity\":%" Pd
","
"\"used\":%" Pd "",
- zone.SizeInBytes(), zone.UsedSizeInBytes());
+ zone.CapacityInBytes(), zone.SizeInBytes());
+ EXPECT_LE(zone.SizeInBytes(), zone.CapacityInBytes());
EXPECT_SUBSTRING(size_buf, json);
}
@@ -217,7 +218,8 @@ UNIT_TEST_CASE(PrintZoneMemoryInfoToJSON) {
OS::SCreate(string_stack_zone.GetZone(), "\"capacity\":%" Pd
","
"\"used\":%" Pd "",
- zone.SizeInBytes(), zone.UsedSizeInBytes());
+ zone.CapacityInBytes(), zone.SizeInBytes());
+ EXPECT_LE(zone.SizeInBytes(), zone.CapacityInBytes());
EXPECT_SUBSTRING(size_buf, json);
}
}
« no previous file with comments | « runtime/vm/zone.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698