diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-12-30 12:20:57 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-12-30 12:20:57 -0800 |
| commit | 252f15e0d5889a461490ec3c5e11e57dbdf0c50b (patch) | |
| tree | 56a2af58775b30882b7d120385b352c1e5d099b6 /src/platform/tcp_stream_test.c | |
| parent | 9c6b2929d8019dcc11935550bc3520ae39c2964e (diff) | |
| download | nng-252f15e0d5889a461490ec3c5e11e57dbdf0c50b.tar.gz nng-252f15e0d5889a461490ec3c5e11e57dbdf0c50b.tar.bz2 nng-252f15e0d5889a461490ec3c5e11e57dbdf0c50b.zip | |
socket activation: test fixes (improve coverage, etc.)
Diffstat (limited to 'src/platform/tcp_stream_test.c')
| -rw-r--r-- | src/platform/tcp_stream_test.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/platform/tcp_stream_test.c b/src/platform/tcp_stream_test.c index a60cf1bd..f8b8d14a 100644 --- a/src/platform/tcp_stream_test.c +++ b/src/platform/tcp_stream_test.c @@ -415,6 +415,17 @@ test_tcp_listen_activation_bogus_fd(void) nng_stream_listener_free(l1); } +void +test_tcp_listen_activation_bad_arg(void) +{ + nng_stream_listener *l1; + + NUTS_PASS(nng_stream_listener_alloc(&l1, "tcp://")); + NUTS_FAIL(nng_stream_listener_set_bool(l1, NNG_OPT_LISTEN_FD, false), + NNG_EBADTYPE); + nng_stream_listener_free(l1); +} + NUTS_TESTS = { { "tcp stream", test_tcp_stream }, { "tcp listen accept cancel", test_tcp_listen_accept_cancel }, @@ -428,5 +439,7 @@ NUTS_TESTS = { test_tcp_listen_activation_wrong_family }, { "tcp socket activation bogus fd", test_tcp_listen_activation_bogus_fd }, + { "tcp socket activation bad arg", + test_tcp_listen_activation_bad_arg }, { NULL, NULL }, }; |
