aboutsummaryrefslogtreecommitdiff
path: root/src/sp/protocol/pubsub0/xsub_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp/protocol/pubsub0/xsub_test.c')
-rw-r--r--src/sp/protocol/pubsub0/xsub_test.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/sp/protocol/pubsub0/xsub_test.c b/src/sp/protocol/pubsub0/xsub_test.c
index eec73505..fdbc5632 100644
--- a/src/sp/protocol/pubsub0/xsub_test.c
+++ b/src/sp/protocol/pubsub0/xsub_test.c
@@ -7,7 +7,8 @@
// found online at https://opensource.org/licenses/MIT.
//
-#include "nng/nng.h"
+#include <nng/nng.h>
+#include <nng/protocol/pubsub0/sub.h>
#include <nuts.h>
static void
@@ -257,22 +258,20 @@ test_xsub_recv_buf_option(void)
static void
test_xsub_subscribe_option(void)
{
- nng_socket sub;
- const char *opt = NNG_OPT_SUB_SUBSCRIBE;
+ nng_socket sub;
NUTS_PASS(nng_sub0_open_raw(&sub));
- NUTS_FAIL(nng_socket_set(sub, opt, "abc", 3), NNG_ENOTSUP);
+ NUTS_FAIL(nng_sub0_socket_subscribe(sub, "abc", 3), NNG_ENOTSUP);
NUTS_CLOSE(sub);
}
static void
test_xsub_unsubscribe_option(void)
{
- nng_socket sub;
- const char *opt = NNG_OPT_SUB_UNSUBSCRIBE;
+ nng_socket sub;
NUTS_PASS(nng_sub0_open_raw(&sub));
- NUTS_FAIL(nng_socket_set(sub, opt, "abc", 3), NNG_ENOTSUP);
+ NUTS_FAIL(nng_sub0_socket_unsubscribe(sub, "abc", 3), NNG_ENOTSUP);
NUTS_CLOSE(sub);
}