diff options
| author | Edward Rudd <urkle@outoforder.cc> | 2021-12-29 10:13:09 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-29 07:13:09 -0800 |
| commit | 44fadb7042fbfdf75f20572c59e410f406bb82f4 (patch) | |
| tree | aa8380a652d7666f9f51732361494db79ec7114a /tests/pollfd.c | |
| parent | 6cf5acb15147766eebdd6cf2731eacd8e0e31518 (diff) | |
| download | nng-44fadb7042fbfdf75f20572c59e410f406bb82f4.tar.gz nng-44fadb7042fbfdf75f20572c59e410f406bb82f4.tar.bz2 nng-44fadb7042fbfdf75f20572c59e410f406bb82f4.zip | |
don't use deprecated functions in tests (#1560)
Diffstat (limited to 'tests/pollfd.c')
| -rw-r--r-- | tests/pollfd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/pollfd.c b/tests/pollfd.c index 2eca7248..0c93c365 100644 --- a/tests/pollfd.c +++ b/tests/pollfd.c @@ -58,13 +58,13 @@ TestMain("Poll FDs", { size_t sz; sz = sizeof(fd); - So(nng_getopt(s1, NNG_OPT_RECVFD, &fd, &sz) == 0); + So(nng_socket_get(s1, NNG_OPT_RECVFD, &fd, &sz) == 0); So(fd != (int) INVALID_SOCKET); Convey("And it is always the same fd", { int fd2; sz = sizeof(fd2); - So(nng_getopt(s1, NNG_OPT_RECVFD, &fd2, &sz) == + So(nng_socket_get(s1, NNG_OPT_RECVFD, &fd2, &sz) == 0); So(fd2 == fd); }); @@ -96,7 +96,7 @@ TestMain("Poll FDs", { size_t sz; sz = sizeof(fd); - So(nng_getopt(s1, NNG_OPT_SENDFD, &fd, &sz) == 0); + So(nng_socket_get(s1, NNG_OPT_SENDFD, &fd, &sz) == 0); So(fd != (int) INVALID_SOCKET); So(nng_send(s1, "oops", 4, 0) == 0); }); @@ -105,10 +105,10 @@ TestMain("Poll FDs", { int fd; size_t sz; sz = 1; - So(nng_getopt(s1, NNG_OPT_RECVFD, &fd, &sz) == + So(nng_socket_get(s1, NNG_OPT_RECVFD, &fd, &sz) == NNG_EINVAL); sz = 128; - So(nng_getopt(s1, NNG_OPT_RECVFD, &fd, &sz) == 0); + So(nng_socket_get(s1, NNG_OPT_RECVFD, &fd, &sz) == 0); So(sz == sizeof(fd)); }); }); @@ -118,7 +118,7 @@ TestMain("Poll FDs", { int fd; So(nng_pull0_open(&s3) == 0); Reset({ nng_close(s3); }); - So(nng_getopt_int(s3, NNG_OPT_SENDFD, &fd) == NNG_ENOTSUP); + So(nng_socket_get_int(s3, NNG_OPT_SENDFD, &fd) == NNG_ENOTSUP); }); Convey("We cannot get a recv FD for PUSH", { @@ -126,6 +126,6 @@ TestMain("Poll FDs", { int fd; So(nng_push0_open(&s3) == 0); Reset({ nng_close(s3); }); - So(nng_getopt_int(s3, NNG_OPT_RECVFD, &fd) == NNG_ENOTSUP); + So(nng_socket_get_int(s3, NNG_OPT_RECVFD, &fd) == NNG_ENOTSUP); }); }) |
