aboutsummaryrefslogtreecommitdiff
path: root/src/compat/nanomsg/compat_testutil.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compat/nanomsg/compat_testutil.h')
-rw-r--r--src/compat/nanomsg/compat_testutil.h40
1 files changed, 18 insertions, 22 deletions
diff --git a/src/compat/nanomsg/compat_testutil.h b/src/compat/nanomsg/compat_testutil.h
index 113d6672..e0612adb 100644
--- a/src/compat/nanomsg/compat_testutil.h
+++ b/src/compat/nanomsg/compat_testutil.h
@@ -45,30 +45,26 @@ extern "C" {
// We do that to facilitate testing. Don't rely on this equivalence in your
// own application code.
-#define TEST_NN_MARRY(s1, s2) \
- do { \
- int rv_; \
- nng_socket s1_, s2_; \
- s1_.id = s1; \
- s2_.id = s2; \
- \
- TEST_CHECK_(testutil_marry(s1_, s2_) == 0, "marry %s", \
- nng_strerror(rv_)); \
+#define TEST_NN_MARRY(s1, s2) \
+ do { \
+ nng_socket s1_, s2_; \
+ s1_.id = s1; \
+ s2_.id = s2; \
+ \
+ NUTS_MARRY(s1_, s2_); \
} while (0)
-#define TEST_NN_MARRY_EX(s1, s2, url, p1, p2) \
- do { \
- int rv_; \
- nng_socket s1_, s2_; \
- nng_pipe p1_, p2_; \
- s1_.id = s1; \
- s2_.id = s2; \
- rv_ = testutil_marry_ex(s1_, s2_, url, &p1_, &p2_); \
- TEST_CHECK_(rv_ == 0, "marry %s", nng_strerror(rv_)); \
- p1 = p1_.id; \
- p2 = p2_.id; \
- TEST_CHECK(p1 >= 0); \
- TEST_CHECK(p2 >= 0); \
+#define TEST_NN_MARRY_EX(s1, s2, url, p1, p2) \
+ do { \
+ nng_socket s1_, s2_; \
+ nng_pipe p1_, p2_; \
+ s1_.id = s1; \
+ s2_.id = s2; \
+ NUTS_MARRY_EX(s1_, s2_, url, &p1_, &p2_); \
+ p1 = p1_.id; \
+ p2 = p2_.id; \
+ NUTS_TRUE(p1 >= 0); \
+ NUTS_TRUE(p2 >= 0); \
} while (0)
#ifdef __cplusplus