mirror of
https://github.com/dart-lang/sdk
synced 2024-09-06 00:59:09 +00:00
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:
parent
3a24020c23
commit
fa25fdd72d
|
@ -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.
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue