From b7cd6e8a8557aba0fae9f913ed8dfcbbafab244b Mon Sep 17 00:00:00 2001 From: Asmod4n Date: Thu, 19 Jan 2017 20:50:18 +0100 Subject: [PATCH] add test and documentation for "draft" capability --- doc/zmq_has.txt | 1 + tests/test_capabilities.cpp | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/zmq_has.txt b/doc/zmq_has.txt index 2f7d75b9..3edc5888 100644 --- a/doc/zmq_has.txt +++ b/doc/zmq_has.txt @@ -27,6 +27,7 @@ defined: * norm - the library supports the norm:// protocol * curve - the library supports the CURVE security mechanism * gssapi - the library supports the GSSAPI security mechanism +* draft - the library is build with the draft api When this method is provided, the zmq.h header file will define ZMQ_HAS_CAPABILITIES. diff --git a/tests/test_capabilities.cpp b/tests/test_capabilities.cpp index bb809a3a..a233581d 100644 --- a/tests/test_capabilities.cpp +++ b/tests/test_capabilities.cpp @@ -42,25 +42,25 @@ int main (void) #else assert (!zmq_has ("pgm")); #endif - + #if defined (ZMQ_HAVE_TIPC) assert (zmq_has ("tipc")); #else assert (!zmq_has ("tipc")); #endif - + #if defined (ZMQ_HAVE_NORM) assert (zmq_has ("norm")); #else assert (!zmq_has ("norm")); #endif - + #if defined (ZMQ_HAVE_CURVE) assert (zmq_has ("curve")); #else assert (!zmq_has ("curve")); #endif - + #if defined (HAVE_LIBGSSAPI_KRB5) assert (zmq_has ("gssapi")); #else @@ -73,5 +73,10 @@ int main (void) assert (!zmq_has("vmci")); #endif +#if defined (ZMQ_BUILD_DRAFT_API) + assert (zmq_has("draft")); +#else + assert (!zmq_has("draft")); +#endif return 0; }