diff options
| author | Garrett D'Amore <garrett@damore.org> | 2025-01-01 12:44:02 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2025-01-01 12:44:02 -0800 |
| commit | 0d23af92531b7c0dd6d7b74c73c1a8c4811c7d13 (patch) | |
| tree | 2dc9ded3dfc724df42a360a9f2de359f406e537f /src/sp/protocol/survey0/survey_test.c | |
| parent | f8a2abaf931557030fd6e6683617c6a7877eebf7 (diff) | |
| download | nng-0d23af92531b7c0dd6d7b74c73c1a8c4811c7d13.tar.gz nng-0d23af92531b7c0dd6d7b74c73c1a8c4811c7d13.tar.bz2 nng-0d23af92531b7c0dd6d7b74c73c1a8c4811c7d13.zip | |
protocols: move content from the protocols to nng.h
This should simplify things for developers. Just one header to include
in most cases now.
Diffstat (limited to 'src/sp/protocol/survey0/survey_test.c')
| -rw-r--r-- | src/sp/protocol/survey0/survey_test.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/sp/protocol/survey0/survey_test.c b/src/sp/protocol/survey0/survey_test.c index 0489bf9f..1be9dee4 100644 --- a/src/sp/protocol/survey0/survey_test.c +++ b/src/sp/protocol/survey0/survey_test.c @@ -11,6 +11,11 @@ #include "nng/nng.h" #include <nuts.h> +#define SURVEYOR0_SELF 0x62 +#define SURVEYOR0_PEER 0x63 +#define SURVEYOR0_SELF_NAME "surveyor" +#define SURVEYOR0_PEER_NAME "respondent" + static void test_surv_identity(void) { @@ -20,13 +25,13 @@ test_surv_identity(void) NUTS_PASS(nng_surveyor0_open(&s)); NUTS_PASS(nng_socket_proto_id(s, &p)); - NUTS_TRUE(p == NNG_SURVEYOR0_SELF); + NUTS_TRUE(p == SURVEYOR0_SELF); NUTS_PASS(nng_socket_peer_id(s, &p)); - NUTS_TRUE(p == NNG_SURVEYOR0_PEER); // 49 + NUTS_TRUE(p == SURVEYOR0_PEER); // 49 NUTS_PASS(nng_socket_proto_name(s, &n)); - NUTS_MATCH(n, NNG_SURVEYOR0_SELF_NAME); + NUTS_MATCH(n, SURVEYOR0_SELF_NAME); NUTS_PASS(nng_socket_peer_name(s, &n)); - NUTS_MATCH(n, NNG_SURVEYOR0_PEER_NAME); + NUTS_MATCH(n, SURVEYOR0_PEER_NAME); NUTS_CLOSE(s); } |
