diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-04-30 21:41:40 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-05-01 12:27:19 -0700 |
| commit | 4998964a435fe0f02a2d81b01fdb837214674e72 (patch) | |
| tree | dc5fe29da0574fc1510ab6f9b23b54ffd68cd97b /tests/message.c | |
| parent | 63bdb2c28bc185096e579d1922d57cb71ecaa36b (diff) | |
| download | nng-4998964a435fe0f02a2d81b01fdb837214674e72.tar.gz nng-4998964a435fe0f02a2d81b01fdb837214674e72.tar.bz2 nng-4998964a435fe0f02a2d81b01fdb837214674e72.zip | |
fixes #381 Want comparators for various types
Diffstat (limited to 'tests/message.c')
| -rw-r--r-- | tests/message.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/message.c b/tests/message.c index bf212b48..7f40cd38 100644 --- a/tests/message.c +++ b/tests/message.c @@ -113,13 +113,17 @@ TestMain("Message Tests", { }); Convey("Pipe retrievals work", { - nng_pipe p; + nng_pipe p = NNG_PIPE_INITIALIZER; + nng_pipe p0 = NNG_PIPE_INITIALIZER; + + So(nng_pipe_id(p0) < 0); p = nng_msg_get_pipe(msg); - So(p.id == 0); - p.id = 45; + So(nng_pipe_id(p) < 0); + memset(&p, 0x22, sizeof(p)); nng_msg_set_pipe(msg, p); p = nng_msg_get_pipe(msg); - So(p.id == 45); + So(nng_pipe_id(p) != nng_pipe_id(p0)); + So(nng_pipe_id(p) == 0x22222222); }); Convey("Message realloc works", { |
