Skip to content

Commit b7cd6e8

Browse files
committed
add test and documentation for "draft" capability
1 parent a6a56e2 commit b7cd6e8

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

doc/zmq_has.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ defined:
2727
* norm - the library supports the norm:// protocol
2828
* curve - the library supports the CURVE security mechanism
2929
* gssapi - the library supports the GSSAPI security mechanism
30+
* draft - the library is build with the draft api
3031

3132
When this method is provided, the zmq.h header file will define
3233
ZMQ_HAS_CAPABILITIES.

tests/test_capabilities.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,25 @@ int main (void)
4242
#else
4343
assert (!zmq_has ("pgm"));
4444
#endif
45-
45+
4646
#if defined (ZMQ_HAVE_TIPC)
4747
assert (zmq_has ("tipc"));
4848
#else
4949
assert (!zmq_has ("tipc"));
5050
#endif
51-
51+
5252
#if defined (ZMQ_HAVE_NORM)
5353
assert (zmq_has ("norm"));
5454
#else
5555
assert (!zmq_has ("norm"));
5656
#endif
57-
57+
5858
#if defined (ZMQ_HAVE_CURVE)
5959
assert (zmq_has ("curve"));
6060
#else
6161
assert (!zmq_has ("curve"));
6262
#endif
63-
63+
6464
#if defined (HAVE_LIBGSSAPI_KRB5)
6565
assert (zmq_has ("gssapi"));
6666
#else
@@ -73,5 +73,10 @@ int main (void)
7373
assert (!zmq_has("vmci"));
7474
#endif
7575

76+
#if defined (ZMQ_BUILD_DRAFT_API)
77+
assert (zmq_has("draft"));
78+
#else
79+
assert (!zmq_has("draft"));
80+
#endif
7681
return 0;
7782
}

0 commit comments

Comments
 (0)