24 const char* str1 =
"msg1";
25 const char* str2 =
"msg2";
26 const char* str3 =
"msg3";
27 const char* str4 =
"msg4";
28 const char* str5 =
"msg5";
29 const char* str6 =
"msg6";
32 std::unique_ptr<Message> msg =
36 queue.Enqueue(std::move(msg),
false);
47 queue.Enqueue(std::move(msg),
false);
58 EXPECT(
queue.FindMessageById(
reinterpret_cast<intptr_t
>(msg1)) == msg1);
59 EXPECT(
queue.FindMessageById(
reinterpret_cast<intptr_t
>(msg2)) == msg2);
65 msg =
queue.Dequeue();
67 EXPECT_STREQ(str1,
reinterpret_cast<char*
>(msg->snapshot()));
75 msg =
queue.Dequeue();
77 EXPECT_STREQ(str2,
reinterpret_cast<char*
>(msg->snapshot()));
82 queue.Enqueue(std::move(msg),
true);
87 queue.Enqueue(std::move(msg),
true);
92 queue.Enqueue(std::move(msg),
false);
97 queue.Enqueue(std::move(msg),
true);
100 msg =
queue.Dequeue();
102 EXPECT_STREQ(str3,
reinterpret_cast<char*
>(msg->snapshot()));
105 msg =
queue.Dequeue();
107 EXPECT_STREQ(str4,
reinterpret_cast<char*
>(msg->snapshot()));
110 msg =
queue.Dequeue();
112 EXPECT_STREQ(str6,
reinterpret_cast<char*
>(msg->snapshot()));
115 msg =
queue.Dequeue();
117 EXPECT_STREQ(str5,
reinterpret_cast<char*
>(msg->snapshot()));
126 const char* str1 =
"msg1";
127 const char* str2 =
"msg2";
130 std::unique_ptr<Message> msg;
133 queue.Enqueue(std::move(msg),
false);
136 queue.Enqueue(std::move(msg),
false);
void Reset(const MessageQueue *queue)
static std::unique_ptr< Message > New(Args &&... args)
static const Dart_Port kIllegalPort
static char * StrDup(const char *s)
static uint8_t * AllocMsg(const char *str)
TEST_CASE(DirectoryCurrent)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service port