aboutsummaryrefslogtreecommitdiff
path: root/tests/pair1.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-09-27 15:14:14 -0700
committerGarrett D'Amore <garrett@damore.org>2017-09-27 15:14:14 -0700
commit0736a958673683a9bfe0bf577b696f49c7bd8302 (patch)
tree93f1995f7e7130ffe31cc9701be6b390faabd6e7 /tests/pair1.c
parent64db0f085be0c9efc6dca8d9e72d3e5a47cb792e (diff)
downloadnng-0736a958673683a9bfe0bf577b696f49c7bd8302.tar.gz
nng-0736a958673683a9bfe0bf577b696f49c7bd8302.tar.bz2
nng-0736a958673683a9bfe0bf577b696f49c7bd8302.zip
Remove last vestiges of integer option numbers.
Diffstat (limited to 'tests/pair1.c')
-rw-r--r--tests/pair1.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/tests/pair1.c b/tests/pair1.c
index c82dd5cb..3789d7c9 100644
--- a/tests/pair1.c
+++ b/tests/pair1.c
@@ -14,8 +14,6 @@
#include <string.h>
-extern const char *nng_opt_pair1_poly;
-
#define APPENDSTR(m, s) nng_msg_append(m, s, strlen(s))
#define CHECKSTR(m, s) \
So(nng_msg_len(m) == strlen(s)); \
@@ -110,7 +108,7 @@ TestMain("PAIRv1 protocol", {
int i;
nng_msg *msg;
- So(nng_setopt_int(s1, nng_opt_pair1_poly, 1) == 0);
+ So(nng_setopt_int(s1, NNG_OPT_PAIR1_POLY, 1) == 0);
So(nng_setopt_int(s1, NNG_OPT_RECVBUF, 1) == 0);
So(nng_setopt_int(s1, NNG_OPT_SENDBUF, 1) == 0);
@@ -165,7 +163,7 @@ TestMain("PAIRv1 protocol", {
So(nng_dial(c1, addr, NULL, 0) == 0);
nng_usleep(100000);
- So(nng_setopt_int(s1, nng_opt_pair1_poly, 1) ==
+ So(nng_setopt_int(s1, NNG_OPT_PAIR1_POLY, 1) ==
NNG_ESTATE);
});
@@ -335,11 +333,11 @@ TestMain("PAIRv1 protocol", {
nng_pipe p1;
nng_pipe p2;
- So(nng_getopt_int(s1, nng_opt_pair1_poly, &v) == 0);
+ So(nng_getopt_int(s1, NNG_OPT_PAIR1_POLY, &v) == 0);
So(v == 0);
- So(nng_setopt_int(s1, nng_opt_pair1_poly, 1) == 0);
- So(nng_getopt_int(s1, nng_opt_pair1_poly, &v) == 0);
+ So(nng_setopt_int(s1, NNG_OPT_PAIR1_POLY, 1) == 0);
+ So(nng_getopt_int(s1, NNG_OPT_PAIR1_POLY, &v) == 0);
So(v == 1);
So(nng_listen(s1, addr, NULL, 0) == 0);
@@ -396,7 +394,7 @@ TestMain("PAIRv1 protocol", {
Convey("Polyamorous default works", {
nng_msg *msg;
- So(nng_setopt_int(s1, nng_opt_pair1_poly, 1) == 0);
+ So(nng_setopt_int(s1, NNG_OPT_PAIR1_POLY, 1) == 0);
So(nng_listen(s1, addr, NULL, 0) == 0);
So(nng_dial(c1, addr, NULL, 0) == 0);
@@ -429,11 +427,11 @@ TestMain("PAIRv1 protocol", {
nng_pipe p1;
nng_pipe p2;
- So(nng_getopt_int(s1, nng_opt_pair1_poly, &v) == 0);
+ So(nng_getopt_int(s1, NNG_OPT_PAIR1_POLY, &v) == 0);
So(v == 0);
- So(nng_setopt_int(s1, nng_opt_pair1_poly, 1) == 0);
- So(nng_getopt_int(s1, nng_opt_pair1_poly, &v) == 0);
+ So(nng_setopt_int(s1, NNG_OPT_PAIR1_POLY, 1) == 0);
+ So(nng_getopt_int(s1, NNG_OPT_PAIR1_POLY, &v) == 0);
So(v == 1);
v = 0;