summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-03-17 17:21:43 -0700
committerGarrett D'Amore <garrett@damore.org>2018-03-17 17:21:43 -0700
commit2e6f76636e2adbc5e2bc4659a0639d83eb3f2d59 (patch)
tree9c4e71aba9f8209e052362be6a32d6bebcff48b8 /tests
parent48bda13b2f3f985389bd3caba923eea77d49c6be (diff)
downloadnng-2e6f76636e2adbc5e2bc4659a0639d83eb3f2d59.tar.gz
nng-2e6f76636e2adbc5e2bc4659a0639d83eb3f2d59.tar.bz2
nng-2e6f76636e2adbc5e2bc4659a0639d83eb3f2d59.zip
fixes #287 remove NNG_OPT_DOMAIN, NNG_OPT_PROTOCOL, and NNG_OPT_TRANSPORT
While here we documented that certain options are not supported in the compatibility layer.
Diffstat (limited to 'tests')
-rw-r--r--tests/sock.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/tests/sock.c b/tests/sock.c
index 1f7567f8..f1570fd8 100644
--- a/tests/sock.c
+++ b/tests/sock.c
@@ -88,8 +88,6 @@ TestMain("Socket Operations", {
NNG_EREADONLY);
So(nng_setopt(s1, NNG_OPT_LOCADDR, "a", 1) ==
NNG_EREADONLY);
- So(nng_setopt_int(s1, NNG_OPT_DOMAIN, 3) ==
- NNG_EREADONLY);
});
Convey("Sockname option works", {
@@ -121,15 +119,13 @@ TestMain("Socket Operations", {
So(strcmp(name, "hello") == 0);
});
- Convey("Domain option works", {
- int dom;
- So(nng_getopt_int(s1, NNG_OPT_DOMAIN, &dom) ==
- 0);
- So(dom == 1); // NN_AF_SP
+ Convey("RAW option works", {
+ int raw;
+ So(nng_getopt_int(s1, NNG_OPT_RAW, &raw) == 0);
+ So(raw == 0);
So(nng_setopt_int(s1, NNG_OPT_RAW, 1) == 0);
- So(nng_getopt_int(s1, NNG_OPT_DOMAIN, &dom) ==
- 0);
- So(dom == 2); // NN_AF_SP_RAW
+ So(nng_getopt_int(s1, NNG_OPT_RAW, &raw) == 0);
+ So(raw == 1);
});
Convey("URL option works", {