Skip to content

Commit 3fcd58d

Browse files
committed
Problem: poller_t simple modify test case missing
1 parent 85e05b0 commit 3fcd58d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/poller.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ TEST(poller, modify_invalid_socket_throws)
289289
ASSERT_THROW (poller.modify (a, ZMQ_POLLIN), zmq::error_t);
290290
}
291291

292-
TEST(poller, modified_not_added_throws)
292+
TEST(poller, modify_not_added_throws)
293293
{
294294
zmq::context_t context;
295295
zmq::socket_t a {context, zmq::socket_type::push};
@@ -299,6 +299,15 @@ TEST(poller, modified_not_added_throws)
299299
ASSERT_THROW (poller.modify (b, ZMQ_POLLIN), zmq::error_t);
300300
}
301301

302+
TEST(poller, modify_simple)
303+
{
304+
zmq::context_t context;
305+
zmq::socket_t a {context, zmq::socket_type::push};
306+
zmq::poller_t poller;
307+
ASSERT_NO_THROW (poller.add (a, ZMQ_POLLIN, zmq::poller_t::handler_t {}));
308+
ASSERT_NO_THROW (poller.modify (a, ZMQ_POLLIN|ZMQ_POLLOUT));
309+
}
310+
302311
TEST(poller, poll_client_server)
303312
{
304313
// Setup server and client

0 commit comments

Comments
 (0)