diff options
| author | Garrett D'Amore <garrett@damore.org> | 2016-12-23 01:50:31 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2016-12-23 01:50:31 -0800 |
| commit | 72440b0d815b1b79941f3f58a47ec4df1ba1e0fc (patch) | |
| tree | 6494c69b89f36ab75976fc7acaec68a4d4f0d1bf /tests | |
| parent | 07478f02caaebf74c11b366d048ba696a8678fec (diff) | |
| download | nng-72440b0d815b1b79941f3f58a47ec4df1ba1e0fc.tar.gz nng-72440b0d815b1b79941f3f58a47ec4df1ba1e0fc.tar.bz2 nng-72440b0d815b1b79941f3f58a47ec4df1ba1e0fc.zip | |
Some tests around recvmsg (no senders yet). Fixes for some edge cases.
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 |
