| Index: mojo/public/c/system/tests/wait_unittest.cc
|
| diff --git a/mojo/public/c/system/tests/wait_unittest.cc b/mojo/public/c/system/tests/wait_unittest.cc
|
| index 541043e08106ad5db78121be3f038b9e16180fd0..9eba943bd9185592a06560970f983b0d014b70c3 100644
|
| --- a/mojo/public/c/system/tests/wait_unittest.cc
|
| +++ b/mojo/public/c/system/tests/wait_unittest.cc
|
| @@ -25,6 +25,21 @@ TEST(WaitTest, InvalidHandle) {
|
| MojoWaitMany(&h, &sig, 1u, MOJO_DEADLINE_INDEFINITE, nullptr, nullptr));
|
| }
|
|
|
| +TEST(WaitTest, WaitManyNoHandles) {
|
| + EXPECT_EQ(MOJO_RESULT_DEADLINE_EXCEEDED,
|
| + MojoWaitMany(nullptr, nullptr, 0u, static_cast<MojoDeadline>(0),
|
| + nullptr, nullptr));
|
| +
|
| + // The |result_index| argument is optional, so make sure it doesn't touch it
|
| + // even if it's non-null.
|
| + // TODO(vtl): The same is true for the |signals_states| argument.
|
| + uint32_t result_index = static_cast<uint32_t>(-1);
|
| + EXPECT_EQ(MOJO_RESULT_DEADLINE_EXCEEDED,
|
| + MojoWaitMany(nullptr, nullptr, 0u, static_cast<MojoDeadline>(1000),
|
| + &result_index, nullptr));
|
| + EXPECT_EQ(static_cast<uint32_t>(-1), result_index);
|
| +}
|
| +
|
| // TODO(vtl): Write tests that actually test waiting.
|
|
|
| } // namespace
|
|
|