test_capabilities.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MPL-2.0 */
2 
3 #include "testutil.hpp"
4 #include "testutil_unity.hpp"
5 
6 void setUp ()
7 {
8 }
9 
10 void tearDown ()
11 {
12 }
13 
15 {
16 #if defined(ZMQ_HAVE_IPC)
17  TEST_ASSERT_TRUE (zmq_has ("ipc"));
18 #else
19  TEST_ASSERT_TRUE (!zmq_has ("ipc"));
20 #endif
21 
22 #if defined(ZMQ_HAVE_OPENPGM)
23  TEST_ASSERT_TRUE (zmq_has ("pgm"));
24 #else
25  TEST_ASSERT_TRUE (!zmq_has ("pgm"));
26 #endif
27 
28 #if defined(ZMQ_HAVE_TIPC)
29  TEST_ASSERT_TRUE (zmq_has ("tipc"));
30 #else
31  TEST_ASSERT_TRUE (!zmq_has ("tipc"));
32 #endif
33 
34 #if defined(ZMQ_HAVE_NORM)
35  TEST_ASSERT_TRUE (zmq_has ("norm"));
36 #else
37  TEST_ASSERT_TRUE (!zmq_has ("norm"));
38 #endif
39 
40 #if defined(ZMQ_HAVE_CURVE)
41  TEST_ASSERT_TRUE (zmq_has ("curve"));
42 #else
43  TEST_ASSERT_TRUE (!zmq_has ("curve"));
44 #endif
45 
46 #if defined(HAVE_LIBGSSAPI_KRB5)
47  TEST_ASSERT_TRUE (zmq_has ("gssapi"));
48 #else
49  TEST_ASSERT_TRUE (!zmq_has ("gssapi"));
50 #endif
51 
52 #if defined(ZMQ_HAVE_VMCI)
53  TEST_ASSERT_TRUE (zmq_has ("vmci"));
54 #else
55  TEST_ASSERT_TRUE (!zmq_has ("vmci"));
56 #endif
57 
58 #if defined(ZMQ_BUILD_DRAFT_API)
59  TEST_ASSERT_TRUE (zmq_has ("draft"));
60 #else
61  TEST_ASSERT_TRUE (!zmq_has ("draft"));
62 #endif
63 }
64 
65 int main ()
66 {
68 
69  UNITY_BEGIN ();
71  return UNITY_END ();
72 }
UNITY_END
return UNITY_END()
TEST_ASSERT_TRUE
#define TEST_ASSERT_TRUE(condition)
Definition: unity.h:121
RUN_TEST
#define RUN_TEST(func)
Definition: unity_internals.h:615
zmq_has
ZMQ_EXPORT int zmq_has(const char *capability_)
Definition: zmq.cpp:1763
test_capabilities
void test_capabilities()
Definition: test_capabilities.cpp:14
testutil_unity.hpp
testutil.hpp
main
int main()
Definition: test_capabilities.cpp:65
tearDown
void tearDown()
Definition: test_capabilities.cpp:10
setup_test_environment
void setup_test_environment(int timeout_seconds_)
Definition: testutil.cpp:201
UNITY_BEGIN
UNITY_BEGIN()
setUp
void setUp()
Definition: test_capabilities.cpp:6


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:59