Index: mojo/edk/system/message_pipe_unittest.cc |
diff --git a/mojo/edk/system/message_pipe_unittest.cc b/mojo/edk/system/message_pipe_unittest.cc |
index dbffb4c4e48b0eca3b370e6c4f480b29b7e09107..030084b6ee5a3e7d08de1894e641b8ec2246b5b5 100644 |
--- a/mojo/edk/system/message_pipe_unittest.cc |
+++ b/mojo/edk/system/message_pipe_unittest.cc |
@@ -39,11 +39,8 @@ TEST(MessagePipeTest, Basic) { |
buffer[1] = 456; |
buffer_size = kBufferSize; |
EXPECT_EQ(MOJO_RESULT_SHOULD_WAIT, |
- mp->ReadMessage(0, |
- UserPointer<void>(buffer), |
- MakeUserPointer(&buffer_size), |
- 0, |
- nullptr, |
+ mp->ReadMessage(0, UserPointer<void>(buffer), |
+ MakeUserPointer(&buffer_size), 0, nullptr, |
MOJO_READ_MESSAGE_FLAG_NONE)); |
EXPECT_EQ(kBufferSize, buffer_size); |
EXPECT_EQ(123, buffer[0]); |
@@ -54,21 +51,16 @@ TEST(MessagePipeTest, Basic) { |
buffer[1] = 456; |
buffer_size = kBufferSize; |
EXPECT_EQ(MOJO_RESULT_SHOULD_WAIT, |
- mp->ReadMessage(1, |
- UserPointer<void>(buffer), |
- MakeUserPointer(&buffer_size), |
- 0, |
- nullptr, |
+ mp->ReadMessage(1, UserPointer<void>(buffer), |
+ MakeUserPointer(&buffer_size), 0, nullptr, |
MOJO_READ_MESSAGE_FLAG_NONE)); |
// Write from port 1 (to port 0). |
buffer[0] = 789012345; |
buffer[1] = 0; |
EXPECT_EQ(MOJO_RESULT_OK, |
- mp->WriteMessage(1, |
- UserPointer<const void>(buffer), |
- static_cast<uint32_t>(sizeof(buffer[0])), |
- nullptr, |
+ mp->WriteMessage(1, UserPointer<const void>(buffer), |
+ static_cast<uint32_t>(sizeof(buffer[0])), nullptr, |
MOJO_WRITE_MESSAGE_FLAG_NONE)); |
// Read from port 0. |
@@ -76,11 +68,8 @@ TEST(MessagePipeTest, Basic) { |
buffer[1] = 456; |
buffer_size = kBufferSize; |
EXPECT_EQ(MOJO_RESULT_OK, |
- mp->ReadMessage(0, |
- UserPointer<void>(buffer), |
- MakeUserPointer(&buffer_size), |
- 0, |
- nullptr, |
+ mp->ReadMessage(0, UserPointer<void>(buffer), |
+ MakeUserPointer(&buffer_size), 0, nullptr, |
MOJO_READ_MESSAGE_FLAG_NONE)); |
EXPECT_EQ(static_cast<uint32_t>(sizeof(buffer[0])), buffer_size); |
EXPECT_EQ(789012345, buffer[0]); |
@@ -89,41 +78,30 @@ TEST(MessagePipeTest, Basic) { |
// Read again from port 0 -- it should be empty. |
buffer_size = kBufferSize; |
EXPECT_EQ(MOJO_RESULT_SHOULD_WAIT, |
- mp->ReadMessage(0, |
- UserPointer<void>(buffer), |
- MakeUserPointer(&buffer_size), |
- 0, |
- nullptr, |
+ mp->ReadMessage(0, UserPointer<void>(buffer), |
+ MakeUserPointer(&buffer_size), 0, nullptr, |
MOJO_READ_MESSAGE_FLAG_NONE)); |
// Write two messages from port 0 (to port 1). |
buffer[0] = 123456789; |
buffer[1] = 0; |
EXPECT_EQ(MOJO_RESULT_OK, |
- mp->WriteMessage(0, |
- UserPointer<const void>(buffer), |
- static_cast<uint32_t>(sizeof(buffer[0])), |
- nullptr, |
+ mp->WriteMessage(0, UserPointer<const void>(buffer), |
+ static_cast<uint32_t>(sizeof(buffer[0])), nullptr, |
MOJO_WRITE_MESSAGE_FLAG_NONE)); |
buffer[0] = 234567890; |
buffer[1] = 0; |
EXPECT_EQ(MOJO_RESULT_OK, |
- mp->WriteMessage(0, |
- UserPointer<const void>(buffer), |
- static_cast<uint32_t>(sizeof(buffer[0])), |
- nullptr, |
+ mp->WriteMessage(0, UserPointer<const void>(buffer), |
+ static_cast<uint32_t>(sizeof(buffer[0])), nullptr, |
MOJO_WRITE_MESSAGE_FLAG_NONE)); |
// Read from port 1 with buffer size 0 (should get the size of next message). |
// Also test that giving a null buffer is okay when the buffer size is 0. |
buffer_size = 0; |
EXPECT_EQ(MOJO_RESULT_RESOURCE_EXHAUSTED, |
- mp->ReadMessage(1, |
- NullUserPointer(), |
- MakeUserPointer(&buffer_size), |
- 0, |
- nullptr, |
- MOJO_READ_MESSAGE_FLAG_NONE)); |
+ mp->ReadMessage(1, NullUserPointer(), MakeUserPointer(&buffer_size), |
+ 0, nullptr, MOJO_READ_MESSAGE_FLAG_NONE)); |
EXPECT_EQ(static_cast<uint32_t>(sizeof(buffer[0])), buffer_size); |
// Read from port 1 with buffer size 1 (too small; should get the size of next |
@@ -132,11 +110,8 @@ TEST(MessagePipeTest, Basic) { |
buffer[1] = 456; |
buffer_size = 1; |
EXPECT_EQ(MOJO_RESULT_RESOURCE_EXHAUSTED, |
- mp->ReadMessage(1, |
- UserPointer<void>(buffer), |
- MakeUserPointer(&buffer_size), |
- 0, |
- nullptr, |
+ mp->ReadMessage(1, UserPointer<void>(buffer), |
+ MakeUserPointer(&buffer_size), 0, nullptr, |
MOJO_READ_MESSAGE_FLAG_NONE)); |
EXPECT_EQ(static_cast<uint32_t>(sizeof(buffer[0])), buffer_size); |
EXPECT_EQ(123, buffer[0]); |
@@ -147,11 +122,8 @@ TEST(MessagePipeTest, Basic) { |
buffer[1] = 456; |
buffer_size = kBufferSize; |
EXPECT_EQ(MOJO_RESULT_OK, |
- mp->ReadMessage(1, |
- UserPointer<void>(buffer), |
- MakeUserPointer(&buffer_size), |
- 0, |
- nullptr, |
+ mp->ReadMessage(1, UserPointer<void>(buffer), |
+ MakeUserPointer(&buffer_size), 0, nullptr, |
MOJO_READ_MESSAGE_FLAG_NONE)); |
EXPECT_EQ(static_cast<uint32_t>(sizeof(buffer[0])), buffer_size); |
EXPECT_EQ(123456789, buffer[0]); |
@@ -162,11 +134,8 @@ TEST(MessagePipeTest, Basic) { |
buffer[1] = 456; |
buffer_size = kBufferSize; |
EXPECT_EQ(MOJO_RESULT_OK, |
- mp->ReadMessage(1, |
- UserPointer<void>(buffer), |
- MakeUserPointer(&buffer_size), |
- 0, |
- nullptr, |
+ mp->ReadMessage(1, UserPointer<void>(buffer), |
+ MakeUserPointer(&buffer_size), 0, nullptr, |
MOJO_READ_MESSAGE_FLAG_NONE)); |
EXPECT_EQ(static_cast<uint32_t>(sizeof(buffer[0])), buffer_size); |
EXPECT_EQ(234567890, buffer[0]); |
@@ -175,21 +144,16 @@ TEST(MessagePipeTest, Basic) { |
// Read again from port 1 -- it should be empty. |
buffer_size = kBufferSize; |
EXPECT_EQ(MOJO_RESULT_SHOULD_WAIT, |
- mp->ReadMessage(1, |
- UserPointer<void>(buffer), |
- MakeUserPointer(&buffer_size), |
- 0, |
- nullptr, |
+ mp->ReadMessage(1, UserPointer<void>(buffer), |
+ MakeUserPointer(&buffer_size), 0, nullptr, |
MOJO_READ_MESSAGE_FLAG_NONE)); |
// Write from port 0 (to port 1). |
buffer[0] = 345678901; |
buffer[1] = 0; |
EXPECT_EQ(MOJO_RESULT_OK, |
- mp->WriteMessage(0, |
- UserPointer<const void>(buffer), |
- static_cast<uint32_t>(sizeof(buffer[0])), |
- nullptr, |
+ mp->WriteMessage(0, UserPointer<const void>(buffer), |
+ static_cast<uint32_t>(sizeof(buffer[0])), nullptr, |
MOJO_WRITE_MESSAGE_FLAG_NONE)); |
// Close port 0. |
@@ -199,10 +163,8 @@ TEST(MessagePipeTest, Basic) { |
buffer[0] = 456789012; |
buffer[1] = 0; |
EXPECT_EQ(MOJO_RESULT_FAILED_PRECONDITION, |
- mp->WriteMessage(1, |
- UserPointer<const void>(buffer), |
- static_cast<uint32_t>(sizeof(buffer[0])), |
- nullptr, |
+ mp->WriteMessage(1, UserPointer<const void>(buffer), |
+ static_cast<uint32_t>(sizeof(buffer[0])), nullptr, |
MOJO_WRITE_MESSAGE_FLAG_NONE)); |
// Read from port 1; should still get message (even though port 0 was closed). |
@@ -210,11 +172,8 @@ TEST(MessagePipeTest, Basic) { |
buffer[1] = 456; |
buffer_size = kBufferSize; |
EXPECT_EQ(MOJO_RESULT_OK, |
- mp->ReadMessage(1, |
- UserPointer<void>(buffer), |
- MakeUserPointer(&buffer_size), |
- 0, |
- nullptr, |
+ mp->ReadMessage(1, UserPointer<void>(buffer), |
+ MakeUserPointer(&buffer_size), 0, nullptr, |
MOJO_READ_MESSAGE_FLAG_NONE)); |
EXPECT_EQ(static_cast<uint32_t>(sizeof(buffer[0])), buffer_size); |
EXPECT_EQ(345678901, buffer[0]); |
@@ -223,11 +182,8 @@ TEST(MessagePipeTest, Basic) { |
// Read again from port 1 -- it should be empty (and port 0 is closed). |
buffer_size = kBufferSize; |
EXPECT_EQ(MOJO_RESULT_FAILED_PRECONDITION, |
- mp->ReadMessage(1, |
- UserPointer<void>(buffer), |
- MakeUserPointer(&buffer_size), |
- 0, |
- nullptr, |
+ mp->ReadMessage(1, UserPointer<void>(buffer), |
+ MakeUserPointer(&buffer_size), 0, nullptr, |
MOJO_READ_MESSAGE_FLAG_NONE)); |
mp->Close(1); |
@@ -244,22 +200,15 @@ TEST(MessagePipeTest, CloseWithQueuedIncomingMessages) { |
for (int32_t i = 0; i < 5; i++) { |
buffer[0] = i; |
EXPECT_EQ(MOJO_RESULT_OK, |
- mp->WriteMessage(1, |
- UserPointer<const void>(buffer), |
- kBufferSize, |
- nullptr, |
- MOJO_WRITE_MESSAGE_FLAG_NONE)); |
+ mp->WriteMessage(1, UserPointer<const void>(buffer), kBufferSize, |
+ nullptr, MOJO_WRITE_MESSAGE_FLAG_NONE)); |
} |
// Port 0 shouldn't be empty. |
buffer_size = 0; |
EXPECT_EQ(MOJO_RESULT_RESOURCE_EXHAUSTED, |
- mp->ReadMessage(0, |
- NullUserPointer(), |
- MakeUserPointer(&buffer_size), |
- 0, |
- nullptr, |
- MOJO_READ_MESSAGE_FLAG_NONE)); |
+ mp->ReadMessage(0, NullUserPointer(), MakeUserPointer(&buffer_size), |
+ 0, nullptr, MOJO_READ_MESSAGE_FLAG_NONE)); |
EXPECT_EQ(kBufferSize, buffer_size); |
// Close port 0 first, which should have outstanding (incoming) messages. |
@@ -278,41 +227,30 @@ TEST(MessagePipeTest, DiscardMode) { |
buffer[0] = 789012345; |
buffer[1] = 0; |
EXPECT_EQ(MOJO_RESULT_OK, |
- mp->WriteMessage(1, |
- UserPointer<const void>(buffer), |
- static_cast<uint32_t>(sizeof(buffer[0])), |
- nullptr, |
+ mp->WriteMessage(1, UserPointer<const void>(buffer), |
+ static_cast<uint32_t>(sizeof(buffer[0])), nullptr, |
MOJO_WRITE_MESSAGE_FLAG_NONE)); |
// Read/discard from port 0 (no buffer); get size. |
buffer_size = 0; |
EXPECT_EQ(MOJO_RESULT_RESOURCE_EXHAUSTED, |
- mp->ReadMessage(0, |
- NullUserPointer(), |
- MakeUserPointer(&buffer_size), |
- 0, |
- nullptr, |
- MOJO_READ_MESSAGE_FLAG_MAY_DISCARD)); |
+ mp->ReadMessage(0, NullUserPointer(), MakeUserPointer(&buffer_size), |
+ 0, nullptr, MOJO_READ_MESSAGE_FLAG_MAY_DISCARD)); |
EXPECT_EQ(static_cast<uint32_t>(sizeof(buffer[0])), buffer_size); |
// Read again from port 0 -- it should be empty. |
buffer_size = kBufferSize; |
EXPECT_EQ(MOJO_RESULT_SHOULD_WAIT, |
- mp->ReadMessage(0, |
- UserPointer<void>(buffer), |
- MakeUserPointer(&buffer_size), |
- 0, |
- nullptr, |
+ mp->ReadMessage(0, UserPointer<void>(buffer), |
+ MakeUserPointer(&buffer_size), 0, nullptr, |
MOJO_READ_MESSAGE_FLAG_MAY_DISCARD)); |
// Write from port 1 (to port 0). |
buffer[0] = 890123456; |
buffer[1] = 0; |
EXPECT_EQ(MOJO_RESULT_OK, |
- mp->WriteMessage(1, |
- UserPointer<const void>(buffer), |
- static_cast<uint32_t>(sizeof(buffer[0])), |
- nullptr, |
+ mp->WriteMessage(1, UserPointer<const void>(buffer), |
+ static_cast<uint32_t>(sizeof(buffer[0])), nullptr, |
MOJO_WRITE_MESSAGE_FLAG_NONE)); |
// Read from port 0 (buffer big enough). |
@@ -320,11 +258,8 @@ TEST(MessagePipeTest, DiscardMode) { |
buffer[1] = 456; |
buffer_size = kBufferSize; |
EXPECT_EQ(MOJO_RESULT_OK, |
- mp->ReadMessage(0, |
- UserPointer<void>(buffer), |
- MakeUserPointer(&buffer_size), |
- 0, |
- nullptr, |
+ mp->ReadMessage(0, UserPointer<void>(buffer), |
+ MakeUserPointer(&buffer_size), 0, nullptr, |
MOJO_READ_MESSAGE_FLAG_MAY_DISCARD)); |
EXPECT_EQ(static_cast<uint32_t>(sizeof(buffer[0])), buffer_size); |
EXPECT_EQ(890123456, buffer[0]); |
@@ -333,72 +268,52 @@ TEST(MessagePipeTest, DiscardMode) { |
// Read again from port 0 -- it should be empty. |
buffer_size = kBufferSize; |
EXPECT_EQ(MOJO_RESULT_SHOULD_WAIT, |
- mp->ReadMessage(0, |
- UserPointer<void>(buffer), |
- MakeUserPointer(&buffer_size), |
- 0, |
- nullptr, |
+ mp->ReadMessage(0, UserPointer<void>(buffer), |
+ MakeUserPointer(&buffer_size), 0, nullptr, |
MOJO_READ_MESSAGE_FLAG_MAY_DISCARD)); |
// Write from port 1 (to port 0). |
buffer[0] = 901234567; |
buffer[1] = 0; |
EXPECT_EQ(MOJO_RESULT_OK, |
- mp->WriteMessage(1, |
- UserPointer<const void>(buffer), |
- static_cast<uint32_t>(sizeof(buffer[0])), |
- nullptr, |
+ mp->WriteMessage(1, UserPointer<const void>(buffer), |
+ static_cast<uint32_t>(sizeof(buffer[0])), nullptr, |
MOJO_WRITE_MESSAGE_FLAG_NONE)); |
// Read/discard from port 0 (buffer too small); get size. |
buffer_size = 1; |
EXPECT_EQ(MOJO_RESULT_RESOURCE_EXHAUSTED, |
- mp->ReadMessage(0, |
- UserPointer<void>(buffer), |
- MakeUserPointer(&buffer_size), |
- 0, |
- nullptr, |
+ mp->ReadMessage(0, UserPointer<void>(buffer), |
+ MakeUserPointer(&buffer_size), 0, nullptr, |
MOJO_READ_MESSAGE_FLAG_MAY_DISCARD)); |
EXPECT_EQ(static_cast<uint32_t>(sizeof(buffer[0])), buffer_size); |
// Read again from port 0 -- it should be empty. |
buffer_size = kBufferSize; |
EXPECT_EQ(MOJO_RESULT_SHOULD_WAIT, |
- mp->ReadMessage(0, |
- UserPointer<void>(buffer), |
- MakeUserPointer(&buffer_size), |
- 0, |
- nullptr, |
+ mp->ReadMessage(0, UserPointer<void>(buffer), |
+ MakeUserPointer(&buffer_size), 0, nullptr, |
MOJO_READ_MESSAGE_FLAG_MAY_DISCARD)); |
// Write from port 1 (to port 0). |
buffer[0] = 123456789; |
buffer[1] = 0; |
EXPECT_EQ(MOJO_RESULT_OK, |
- mp->WriteMessage(1, |
- UserPointer<const void>(buffer), |
- static_cast<uint32_t>(sizeof(buffer[0])), |
- nullptr, |
+ mp->WriteMessage(1, UserPointer<const void>(buffer), |
+ static_cast<uint32_t>(sizeof(buffer[0])), nullptr, |
MOJO_WRITE_MESSAGE_FLAG_NONE)); |
// Discard from port 0. |
buffer_size = 1; |
EXPECT_EQ(MOJO_RESULT_RESOURCE_EXHAUSTED, |
- mp->ReadMessage(0, |
- NullUserPointer(), |
- NullUserPointer(), |
- 0, |
- nullptr, |
+ mp->ReadMessage(0, NullUserPointer(), NullUserPointer(), 0, nullptr, |
MOJO_READ_MESSAGE_FLAG_MAY_DISCARD)); |
// Read again from port 0 -- it should be empty. |
buffer_size = kBufferSize; |
EXPECT_EQ(MOJO_RESULT_SHOULD_WAIT, |
- mp->ReadMessage(0, |
- UserPointer<void>(buffer), |
- MakeUserPointer(&buffer_size), |
- 0, |
- nullptr, |
+ mp->ReadMessage(0, UserPointer<void>(buffer), |
+ MakeUserPointer(&buffer_size), 0, nullptr, |
MOJO_READ_MESSAGE_FLAG_MAY_DISCARD)); |
mp->Close(0); |
@@ -424,13 +339,10 @@ TEST(MessagePipeTest, BasicWaiting) { |
hss.satisfiable_signals); |
waiter.Init(); |
hss = HandleSignalsState(); |
- EXPECT_EQ( |
- MOJO_RESULT_ALREADY_EXISTS, |
- mp->AddWaiter(0, |
- &waiter, |
- MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_WRITABLE, |
- 0, |
- &hss)); |
+ EXPECT_EQ(MOJO_RESULT_ALREADY_EXISTS, |
+ mp->AddWaiter(0, &waiter, MOJO_HANDLE_SIGNAL_READABLE | |
+ MOJO_HANDLE_SIGNAL_WRITABLE, |
+ 0, &hss)); |
EXPECT_EQ(MOJO_HANDLE_SIGNAL_WRITABLE, hss.satisfied_signals); |
EXPECT_EQ(MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_WRITABLE, |
hss.satisfiable_signals); |
@@ -449,11 +361,8 @@ TEST(MessagePipeTest, BasicWaiting) { |
// Write from port 0 (to port 1), to make port 1 readable. |
buffer[0] = 123456789; |
EXPECT_EQ(MOJO_RESULT_OK, |
- mp->WriteMessage(0, |
- UserPointer<const void>(buffer), |
- kBufferSize, |
- nullptr, |
- MOJO_WRITE_MESSAGE_FLAG_NONE)); |
+ mp->WriteMessage(0, UserPointer<const void>(buffer), kBufferSize, |
+ nullptr, MOJO_WRITE_MESSAGE_FLAG_NONE)); |
// Port 1 should already be readable now. |
waiter.Init(); |
@@ -466,13 +375,10 @@ TEST(MessagePipeTest, BasicWaiting) { |
hss.satisfiable_signals); |
waiter.Init(); |
hss = HandleSignalsState(); |
- EXPECT_EQ( |
- MOJO_RESULT_ALREADY_EXISTS, |
- mp->AddWaiter(1, |
- &waiter, |
- MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_WRITABLE, |
- 0, |
- &hss)); |
+ EXPECT_EQ(MOJO_RESULT_ALREADY_EXISTS, |
+ mp->AddWaiter(1, &waiter, MOJO_HANDLE_SIGNAL_READABLE | |
+ MOJO_HANDLE_SIGNAL_WRITABLE, |
+ 0, &hss)); |
EXPECT_EQ(MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_WRITABLE, |
hss.satisfied_signals); |
EXPECT_EQ(MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_WRITABLE, |
@@ -510,11 +416,8 @@ TEST(MessagePipeTest, BasicWaiting) { |
buffer[0] = 0; |
buffer_size = kBufferSize; |
EXPECT_EQ(MOJO_RESULT_OK, |
- mp->ReadMessage(1, |
- UserPointer<void>(buffer), |
- MakeUserPointer(&buffer_size), |
- 0, |
- nullptr, |
+ mp->ReadMessage(1, UserPointer<void>(buffer), |
+ MakeUserPointer(&buffer_size), 0, nullptr, |
MOJO_READ_MESSAGE_FLAG_NONE)); |
EXPECT_EQ(123456789, buffer[0]); |
@@ -543,18 +446,15 @@ TEST(MessagePipeTest, ThreadedWaiting) { |
thread.waiter()->Init(); |
ASSERT_EQ(MOJO_RESULT_OK, |
- mp->AddWaiter( |
- 1, thread.waiter(), MOJO_HANDLE_SIGNAL_READABLE, 1, nullptr)); |
+ mp->AddWaiter(1, thread.waiter(), MOJO_HANDLE_SIGNAL_READABLE, 1, |
+ nullptr)); |
thread.Start(); |
buffer[0] = 123456789; |
// Write from port 0 (to port 1), which should wake up the waiter. |
EXPECT_EQ(MOJO_RESULT_OK, |
- mp->WriteMessage(0, |
- UserPointer<const void>(buffer), |
- kBufferSize, |
- nullptr, |
- MOJO_WRITE_MESSAGE_FLAG_NONE)); |
+ mp->WriteMessage(0, UserPointer<const void>(buffer), kBufferSize, |
+ nullptr, MOJO_WRITE_MESSAGE_FLAG_NONE)); |
HandleSignalsState hss; |
mp->RemoveWaiter(1, thread.waiter(), &hss); |
@@ -577,8 +477,8 @@ TEST(MessagePipeTest, ThreadedWaiting) { |
thread.waiter()->Init(); |
ASSERT_EQ(MOJO_RESULT_OK, |
- mp->AddWaiter( |
- 1, thread.waiter(), MOJO_HANDLE_SIGNAL_READABLE, 2, nullptr)); |
+ mp->AddWaiter(1, thread.waiter(), MOJO_HANDLE_SIGNAL_READABLE, 2, |
+ nullptr)); |
thread.Start(); |
// Close port 1 first -- this should result in the waiter being cancelled. |
@@ -600,8 +500,8 @@ TEST(MessagePipeTest, ThreadedWaiting) { |
thread.waiter()->Init(); |
ASSERT_EQ(MOJO_RESULT_OK, |
- mp->AddWaiter( |
- 1, thread.waiter(), MOJO_HANDLE_SIGNAL_READABLE, 3, nullptr)); |
+ mp->AddWaiter(1, thread.waiter(), MOJO_HANDLE_SIGNAL_READABLE, 3, |
+ nullptr)); |
thread.Start(); |
// Close port 0 first -- this should wake the waiter up, since port 1 will |