diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-10-31 00:47:21 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-10-31 00:47:21 -0700 |
| commit | 475f4c8abfdd9c88b585105c48839f51d7523d57 (patch) | |
| tree | f6fa693cd20d1f419ec5a1af0b60ffb798b68b4c /tests | |
| parent | b92320b9afe3771465514286db6ee6746ba512d8 (diff) | |
| download | nng-475f4c8abfdd9c88b585105c48839f51d7523d57.tar.gz nng-475f4c8abfdd9c88b585105c48839f51d7523d57.tar.bz2 nng-475f4c8abfdd9c88b585105c48839f51d7523d57.zip | |
fixes #137 Remove public access to numeric protocols
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bus.c | 5 | ||||
| -rw-r--r-- | tests/pipeline.c | 10 | ||||
| -rw-r--r-- | tests/pubsub.c | 10 | ||||
| -rw-r--r-- | tests/reqrep.c | 10 | ||||
| -rw-r--r-- | tests/sock.c | 5 | ||||
| -rw-r--r-- | tests/survey.c | 10 |
6 files changed, 0 insertions, 50 deletions
diff --git a/tests/bus.c b/tests/bus.c index dd36d5a5..8283bf21 100644 --- a/tests/bus.c +++ b/tests/bus.c @@ -29,11 +29,6 @@ TestMain("BUS pattern", { So(nng_bus_open(&bus) == 0); Reset({ nng_close(bus); }); - - Convey("Protocols match", { - So(nng_protocol(bus) == NNG_PROTO_BUS); - So(nng_peer(bus) == NNG_PROTO_BUS); - }); }); Convey("We can create a linked BUS topology", { diff --git a/tests/pipeline.c b/tests/pipeline.c index 31f02798..67be57c6 100644 --- a/tests/pipeline.c +++ b/tests/pipeline.c @@ -28,11 +28,6 @@ TestMain("PIPELINE (PUSH/PULL) pattern", { Reset({ nng_close(push); }); - Convey("Protocols match", { - So(nng_protocol(push) == NNG_PROTO_PUSH); - So(nng_peer(push) == NNG_PROTO_PULL); - }); - Convey("Recv fails", { nng_msg *msg; So(nng_recvmsg(push, &msg, 0) == NNG_ENOTSUP); @@ -45,11 +40,6 @@ TestMain("PIPELINE (PUSH/PULL) pattern", { Reset({ nng_close(pull); }); - Convey("Protocols match", { - So(nng_protocol(pull) == NNG_PROTO_PULL); - So(nng_peer(pull) == NNG_PROTO_PUSH); - }); - Convey("Send fails", { nng_msg *msg; So(nng_msg_alloc(&msg, 0) == 0); diff --git a/tests/pubsub.c b/tests/pubsub.c index e79c3f1d..a8209a7d 100644 --- a/tests/pubsub.c +++ b/tests/pubsub.c @@ -30,11 +30,6 @@ TestMain("PUB/SUB pattern", { Reset({ nng_close(pub); }); - Convey("Protocols match", { - So(nng_protocol(pub) == NNG_PROTO_PUB); - So(nng_peer(pub) == NNG_PROTO_SUB); - }); - Convey("Recv fails", { nng_msg *msg; So(nng_recvmsg(pub, &msg, 0) == NNG_ENOTSUP); @@ -47,11 +42,6 @@ TestMain("PUB/SUB pattern", { Reset({ nng_close(sub); }); - Convey("Protocols match", { - So(nng_protocol(sub) == NNG_PROTO_SUB); - So(nng_peer(sub) == NNG_PROTO_PUB); - }); - Convey("Send fails", { nng_msg *msg; So(nng_msg_alloc(&msg, 0) == 0); diff --git a/tests/reqrep.c b/tests/reqrep.c index ada21875..df0621bc 100644 --- a/tests/reqrep.c +++ b/tests/reqrep.c @@ -23,11 +23,6 @@ TestMain("REQ/REP pattern", { Reset({ nng_close(req); }); - Convey("Protocols match", { - So(nng_protocol(req) == NNG_PROTO_REQ); - So(nng_peer(req) == NNG_PROTO_REP); - }); - Convey("Resend time option id works", { // Set timeout. @@ -51,11 +46,6 @@ TestMain("REQ/REP pattern", { Reset({ nng_close(rep); }); - Convey("Protocols match", { - So(nng_protocol(rep) == NNG_PROTO_REP); - So(nng_peer(rep) == NNG_PROTO_REQ); - }); - Convey("Send with no recv fails", { nng_msg *msg; rv = nng_msg_alloc(&msg, 0); diff --git a/tests/sock.c b/tests/sock.c index cbe3d012..1c277b46 100644 --- a/tests/sock.c +++ b/tests/sock.c @@ -32,11 +32,6 @@ TestMain("Socket Operations", { Reset({ nng_close(s1); }); - Convey("It's type & peer are still PAIR", { - So(nng_protocol(s1) == NNG_PROTO_PAIR); - So(nng_peer(s1) == NNG_PROTO_PAIR); - }); - Convey("Recv with no pipes times out correctly", { nng_msg * msg = NULL; nng_duration to = 100; diff --git a/tests/survey.c b/tests/survey.c index d73ae987..f4fab009 100644 --- a/tests/survey.c +++ b/tests/survey.c @@ -30,11 +30,6 @@ TestMain("SURVEY pattern", { Reset({ nng_close(surv); }); - Convey("Protocols match", { - So(nng_protocol(surv) == NNG_PROTO_SURVEYOR); - So(nng_peer(surv) == NNG_PROTO_RESPONDENT); - }); - Convey("Recv with no survey fails", { nng_msg *msg; So(nng_recvmsg(surv, &msg, 0) == NNG_ESTATE); @@ -57,11 +52,6 @@ TestMain("SURVEY pattern", { Reset({ nng_close(resp); }); - Convey("Protocols match", { - So(nng_protocol(resp) == NNG_PROTO_RESPONDENT); - So(nng_peer(resp) == NNG_PROTO_SURVEYOR); - }); - Convey("Send fails with no survey", { nng_msg *msg; So(nng_msg_alloc(&msg, 0) == 0); |
