diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/sock.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/sock.c b/tests/sock.c index 40949bfe..76942d31 100644 --- a/tests/sock.c +++ b/tests/sock.c @@ -27,5 +27,19 @@ TestMain("Socket Operations", { Convey("It's type is still proto", { So(nng_socket_protocol(sock) == NNG_PROTO_PAIR); }) + + Convey("Recv on with no pipes times out", { + nng_msg *msg = NULL; + rv = nng_recvmsg(sock, &msg, 0); + So(rv == NNG_ETIMEDOUT); + So(msg == NULL); + }) + + Convey("Recv nonblock with no pipes gives EAGAIN", { + nng_msg *msg = NULL; + rv = nng_recvmsg(sock, &msg, NNG_FLAG_NONBLOCK); + So(rv == NNG_EAGAIN); + So(msg == NULL); + }) }) })
\ No newline at end of file |
