| Index: test/cctest/test-heap-profiler.cc
|
| diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc
|
| index f8e5a6b755ff423a9202e31b5673e8cba64db2dd..1e9cb7355773ff2d9e32054807cf64a3e10658f3 100644
|
| --- a/test/cctest/test-heap-profiler.cc
|
| +++ b/test/cctest/test-heap-profiler.cc
|
| @@ -322,7 +322,14 @@ TEST(RetainerProfile) {
|
| }
|
| RetainerProfilePrinter printer;
|
| ret_profile.DebugPrintStats(&printer);
|
| - CHECK_EQ("(global property);1,B;2,C;2", printer.GetRetainers("A"));
|
| + const char* retainers_of_a = printer.GetRetainers("A");
|
| + // The order of retainers is unspecified, so we check string length, and
|
| + // verify each retainer separately.
|
| + CHECK_EQ(static_cast<int>(strlen("(global property);1,B;2,C;2")),
|
| + static_cast<int>(strlen(retainers_of_a)));
|
| + CHECK(strstr(retainers_of_a, "(global property);1") != NULL);
|
| + CHECK(strstr(retainers_of_a, "B;2") != NULL);
|
| + CHECK(strstr(retainers_of_a, "C;2") != NULL);
|
| CHECK_EQ("(global property);2", printer.GetRetainers("B"));
|
| CHECK_EQ("(global property);1", printer.GetRetainers("C"));
|
| }
|
|
|