summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-05-21 13:27:06 -0700
committerGarrett D'Amore <garrett@damore.org>2018-05-21 13:28:56 -0700
commit6abb328523509d35663f54ee0012254232df4a0a (patch)
treec3a83caeadf0e716bea7debb7d5539e4a7c29263 /tests
parent0671f3d49ef001c70d47d7398e47a23dbc3dd556 (diff)
downloadnng-6abb328523509d35663f54ee0012254232df4a0a.tar.gz
nng-6abb328523509d35663f54ee0012254232df4a0a.tar.bz2
nng-6abb328523509d35663f54ee0012254232df4a0a.zip
fixes #457 Create stub headers for compatibility
I actually made these real headers, not stubs While here I made some improvements to the nng_compat man page, to improve the language and also the presentation on some devices. (We were going nuts with the icons, instead, I've made a single new section, called Caveats, that lists a bunch of them.) This should not have any impact on binary compatibility.
Diffstat (limited to 'tests')
-rw-r--r--tests/compat_block.c1
-rw-r--r--tests/compat_bug777.c1
-rw-r--r--tests/compat_bus.c1
-rw-r--r--tests/compat_cmsg.c3
-rw-r--r--tests/compat_device.c4
-rw-r--r--tests/compat_iovec.c1
-rw-r--r--tests/compat_msg.c2
-rw-r--r--tests/compat_options.c1
-rw-r--r--tests/compat_pair.c1
-rw-r--r--tests/compat_pipeline.c1
-rw-r--r--tests/compat_poll.c2
-rw-r--r--tests/compat_reqrep.c1
-rw-r--r--tests/compat_reqttl.c2
-rw-r--r--tests/compat_shutdown.c2
-rw-r--r--tests/compat_survey.c1
-rw-r--r--tests/compat_surveyttl.c2
-rw-r--r--tests/compat_testutil.h6
17 files changed, 29 insertions, 3 deletions
diff --git a/tests/compat_block.c b/tests/compat_block.c
index 65bd123c..1524803e 100644
--- a/tests/compat_block.c
+++ b/tests/compat_block.c
@@ -21,6 +21,7 @@
*/
#include <nanomsg/nn.h>
+#include <nanomsg/pair.h>
#include "compat_testutil.h"
/* This test checks whether blocking on send/recv works as expected. */
diff --git a/tests/compat_bug777.c b/tests/compat_bug777.c
index f5cfde6a..be7ed6cd 100644
--- a/tests/compat_bug777.c
+++ b/tests/compat_bug777.c
@@ -22,6 +22,7 @@
*/
#include <nanomsg/nn.h>
+#include <nanomsg/pair.h>
#include "compat_testutil.h"
int main (NN_UNUSED int argc, NN_UNUSED const char *argv[])
diff --git a/tests/compat_bus.c b/tests/compat_bus.c
index a8b380ab..eab41b47 100644
--- a/tests/compat_bus.c
+++ b/tests/compat_bus.c
@@ -21,6 +21,7 @@
*/
#include <nanomsg/nn.h>
+#include <nanomsg/bus.h>
#include "compat_testutil.h"
#define SOCKET_ADDRESS_A "inproc://a"
diff --git a/tests/compat_cmsg.c b/tests/compat_cmsg.c
index 9484161b..774049b2 100644
--- a/tests/compat_cmsg.c
+++ b/tests/compat_cmsg.c
@@ -23,6 +23,9 @@
*/
#include <nanomsg/nn.h>
+#include <nanomsg/tcp.h>
+#include <nanomsg/reqrep.h>
+
#include "compat_testutil.h"
int main (int argc, const char *argv[])
diff --git a/tests/compat_device.c b/tests/compat_device.c
index 21b9c16e..5c4068d9 100644
--- a/tests/compat_device.c
+++ b/tests/compat_device.c
@@ -22,6 +22,10 @@
*/
#include <nanomsg/nn.h>
+#include <nanomsg/bus.h>
+#include <nanomsg/pair.h>
+#include <nanomsg/pipeline.h>
+#include <nanomsg/inproc.h>
#include "compat_testutil.h"
#define SOCKET_ADDRESS_A "inproc://a"
diff --git a/tests/compat_iovec.c b/tests/compat_iovec.c
index 6a68e1ba..c579642a 100644
--- a/tests/compat_iovec.c
+++ b/tests/compat_iovec.c
@@ -21,6 +21,7 @@
*/
#include <nanomsg/nn.h>
+#include <nanomsg/pair.h>
#include "compat_testutil.h"
diff --git a/tests/compat_msg.c b/tests/compat_msg.c
index 7618ea0a..50a6004b 100644
--- a/tests/compat_msg.c
+++ b/tests/compat_msg.c
@@ -24,6 +24,8 @@
*/
#include <nanomsg/nn.h>
+#include <nanomsg/pair.h>
+
#include "compat_testutil.h"
#include <string.h>
diff --git a/tests/compat_options.c b/tests/compat_options.c
index 1cf147f5..307c0e1c 100644
--- a/tests/compat_options.c
+++ b/tests/compat_options.c
@@ -11,6 +11,7 @@
#include "convey.h"
#include "compat/nanomsg/nn.h"
+#include "compat/nanomsg/reqrep.h"
#include "compat_testutil.h"
diff --git a/tests/compat_pair.c b/tests/compat_pair.c
index 769b99fa..a0bc22f4 100644
--- a/tests/compat_pair.c
+++ b/tests/compat_pair.c
@@ -21,6 +21,7 @@
*/
#include <nanomsg/nn.h>
+#include <nanomsg/pair.h>
#include "compat_testutil.h"
diff --git a/tests/compat_pipeline.c b/tests/compat_pipeline.c
index 2e5b0de9..fda3ae54 100644
--- a/tests/compat_pipeline.c
+++ b/tests/compat_pipeline.c
@@ -22,6 +22,7 @@
*/
#include <nanomsg/nn.h>
+#include <nanomsg/pipeline.h>
#include "compat_testutil.h"
#define SOCKET_ADDRESS "inproc://a"
diff --git a/tests/compat_poll.c b/tests/compat_poll.c
index 1101eb0a..ce9ec0f6 100644
--- a/tests/compat_poll.c
+++ b/tests/compat_poll.c
@@ -34,6 +34,8 @@
#endif
#include "compat_testutil.h"
#include <nanomsg/nn.h>
+#include <nanomsg/pair.h>
+#include <nanomsg/inproc.h>
/* Test of polling via NN_SNDFD/NN_RCVFD mechanism. */
diff --git a/tests/compat_reqrep.c b/tests/compat_reqrep.c
index 36ad15f3..893eceac 100644
--- a/tests/compat_reqrep.c
+++ b/tests/compat_reqrep.c
@@ -23,6 +23,7 @@
*/
#include <nanomsg/nn.h>
+#include <nanomsg/reqrep.h>
#include "compat_testutil.h"
diff --git a/tests/compat_reqttl.c b/tests/compat_reqttl.c
index 84c73e09..dc525255 100644
--- a/tests/compat_reqttl.c
+++ b/tests/compat_reqttl.c
@@ -24,6 +24,8 @@
*/
#include <nanomsg/nn.h>
+#include <nanomsg/reqrep.h>
+#include <nanomsg/tcp.h>
#include "compat_testutil.h"
diff --git a/tests/compat_shutdown.c b/tests/compat_shutdown.c
index 6d078ee2..452aa2cc 100644
--- a/tests/compat_shutdown.c
+++ b/tests/compat_shutdown.c
@@ -22,6 +22,8 @@
*/
#include <nanomsg/nn.h>
+#include <nanomsg/tcp.h>
+#include <nanomsg/reqrep.h>
#include "compat_testutil.h"
int main (int argc, const char *argv[])
diff --git a/tests/compat_survey.c b/tests/compat_survey.c
index 30b7ae68..2d1fe0a0 100644
--- a/tests/compat_survey.c
+++ b/tests/compat_survey.c
@@ -22,6 +22,7 @@
*/
#include <nanomsg/nn.h>
+#include <nanomsg/survey.h>
#include "compat_testutil.h"
diff --git a/tests/compat_surveyttl.c b/tests/compat_surveyttl.c
index 1c6f66be..6d9f614d 100644
--- a/tests/compat_surveyttl.c
+++ b/tests/compat_surveyttl.c
@@ -24,6 +24,8 @@
*/
#include <nanomsg/nn.h>
+#include <nanomsg/survey.h>
+#include <nanomsg/tcp.h>
#include "compat_testutil.h"
diff --git a/tests/compat_testutil.h b/tests/compat_testutil.h
index ce5968a2..b7c2ecaa 100644
--- a/tests/compat_testutil.h
+++ b/tests/compat_testutil.h
@@ -28,8 +28,8 @@
// it for validating the compatibility features of nanomsg. As much as
// possible we want to run tests from the nanomsg test suite unmodified.
-#ifndef TESTUTIL_H_INCLUDED
-#define TESTUTIL_H_INCLUDED
+#ifndef COMPAT_TESTUTIL_H_INCLUDED
+#define COMPAT_TESTUTIL_H_INCLUDED
#include <assert.h>
#include <stdio.h>
@@ -80,4 +80,4 @@ struct nn_thread {
extern int nn_thread_init(struct nn_thread *, void (*)(void *), void *);
extern void nn_thread_term(struct nn_thread *);
-#endif // TESTUTIL_H_INCLUDED
+#endif // COMPAT_TESTUTIL_H_INCLUDED