diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-03-20 18:38:54 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-03-20 18:42:23 -0700 |
| commit | 6df40cb6eea9a4220d61c4c927ce5a857a12a338 (patch) | |
| tree | ac4b7ecbcb41a456eb4d0429fc180047656371ba /tests/sock.c | |
| parent | 9ca901c1b70b17d851426483d9f54611cfa8e395 (diff) | |
| download | nng-6df40cb6eea9a4220d61c4c927ce5a857a12a338.tar.gz nng-6df40cb6eea9a4220d61c4c927ce5a857a12a338.tar.bz2 nng-6df40cb6eea9a4220d61c4c927ce5a857a12a338.zip | |
fixes #301 String option handling for getopt
Diffstat (limited to 'tests/sock.c')
| -rw-r--r-- | tests/sock.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/sock.c b/tests/sock.c index 75d7c140..30dcd1b5 100644 --- a/tests/sock.c +++ b/tests/sock.c @@ -198,18 +198,18 @@ TestMain("Socket Operations", { Convey("Short size is not copied", { size_t sz = 0; to = 0; - So(nng_getopt( - s1, NNG_OPT_SENDTIMEO, &to, &sz) == 0); + So(nng_getopt(s1, NNG_OPT_SENDTIMEO, &to, + &sz) == NNG_EINVAL); So(sz == sizeof(to)); So(to == 0); sz = 0; - So(nng_getopt( - s1, NNG_OPT_RECONNMINT, &to, &sz) == 0); + So(nng_getopt(s1, NNG_OPT_RECONNMINT, &to, + &sz) == NNG_EINVAL); So(to == 0); sz = 0; - So(nng_getopt( - s1, NNG_OPT_RECONNMAXT, &to, &sz) == 0); + So(nng_getopt(s1, NNG_OPT_RECONNMAXT, &to, + &sz) == NNG_EINVAL); So(to == 0); }); @@ -225,7 +225,7 @@ TestMain("Socket Operations", { int l = 5; size_t sz = 0; So(nng_getopt(s1, NNG_OPT_RECVBUF, &l, &sz) == - 0); + NNG_EINVAL); So(sz == sizeof(l)); So(l == 5); }); |
