Fixed tests breaking build.

Merge branch 'master' of github.com:dart-lang/sdk into fix

Updated format string to reflect actual type.

BUG=

Review-Url: https://codereview.chromium.org/2562243003 .
This commit is contained in:
Ben Konyi 2016-12-12 11:36:55 -08:00
parent 3a24020c23
commit fa25fdd72d
2 changed files with 18 additions and 14 deletions

View file

@ -335,18 +335,20 @@ TEST_CASE(ManySimpleTasksWithZones) {
char* zone_info_buf =
OS::SCreate(current_zone,
"\"type\":\"_Zone\","
"\"capacity\":%ld,"
"\"used\":%ld",
"\"capacity\":%" Pd
","
"\"used\":%" Pd "",
top_zone->SizeInBytes(), top_zone->UsedSizeInBytes());
EXPECT_SUBSTRING(zone_info_buf, json);
top_zone = top_zone->previous();
}
// Check the thread exists and is the correct size.
char* thread_info_buf = OS::SCreate(current_zone,
"\"type\":\"_Thread\","
"\"id\":\"threads\\/%" Pd64 "",
thread->os_thread()->trace_id());
char* thread_info_buf = OS::SCreate(
current_zone,
"\"type\":\"_Thread\","
"\"id\":\"threads\\/%" Pd "",
OSThread::ThreadIdToIntPtr(thread->os_thread()->trace_id()));
// Ensure the isolate for each thread is valid.

View file

@ -197,10 +197,11 @@ UNIT_TEST_CASE(PrintZoneMemoryInfoToJSON) {
zone.GetZone()->PrintJSON(&stream);
const char* json = stream.ToCString();
// Ensure that matches actual values.
char* size_buf = OS::SCreate(string_stack_zone.GetZone(),
"\"capacity\":%ld,"
"\"used\":%ld",
zone.SizeInBytes(), zone.UsedSizeInBytes());
char* size_buf =
OS::SCreate(string_stack_zone.GetZone(), "\"capacity\":%" Pd
","
"\"used\":%" Pd "",
zone.SizeInBytes(), zone.UsedSizeInBytes());
EXPECT_SUBSTRING(size_buf, json);
}
@ -212,10 +213,11 @@ UNIT_TEST_CASE(PrintZoneMemoryInfoToJSON) {
JSONStream stream;
zone.GetZone()->PrintJSON(&stream);
const char* json = stream.ToCString();
char* size_buf = OS::SCreate(string_stack_zone.GetZone(),
"\"capacity\":%ld,"
"\"used\":%ld",
zone.SizeInBytes(), zone.UsedSizeInBytes());
char* size_buf =
OS::SCreate(string_stack_zone.GetZone(), "\"capacity\":%" Pd
","
"\"used\":%" Pd "",
zone.SizeInBytes(), zone.UsedSizeInBytes());
EXPECT_SUBSTRING(size_buf, json);
}
}