2023-06-05 01:16:05 +02:00
|
|
|
/* SPDX-License-Identifier: MPL-2.0 */
|
2014-06-18 15:10:18 +02:00
|
|
|
|
|
|
|
#include "testutil.hpp"
|
2018-08-20 11:48:21 +02:00
|
|
|
#include "testutil_unity.hpp"
|
2014-06-18 15:10:18 +02:00
|
|
|
|
2018-08-20 11:48:21 +02:00
|
|
|
void setUp ()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void tearDown ()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void test_capabilities ()
|
2014-06-18 15:10:18 +02:00
|
|
|
{
|
2019-12-06 19:42:42 +01:00
|
|
|
#if defined(ZMQ_HAVE_IPC)
|
2018-08-20 11:48:21 +02:00
|
|
|
TEST_ASSERT_TRUE (zmq_has ("ipc"));
|
2014-06-18 15:10:18 +02:00
|
|
|
#else
|
2018-08-20 11:48:21 +02:00
|
|
|
TEST_ASSERT_TRUE (!zmq_has ("ipc"));
|
2014-06-18 15:10:18 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(ZMQ_HAVE_OPENPGM)
|
2018-08-20 11:48:21 +02:00
|
|
|
TEST_ASSERT_TRUE (zmq_has ("pgm"));
|
2014-06-18 15:10:18 +02:00
|
|
|
#else
|
2018-08-20 11:48:21 +02:00
|
|
|
TEST_ASSERT_TRUE (!zmq_has ("pgm"));
|
2014-06-18 15:10:18 +02:00
|
|
|
#endif
|
2017-01-19 20:50:18 +01:00
|
|
|
|
2014-06-18 15:10:18 +02:00
|
|
|
#if defined(ZMQ_HAVE_TIPC)
|
2018-08-20 11:48:21 +02:00
|
|
|
TEST_ASSERT_TRUE (zmq_has ("tipc"));
|
2014-06-18 15:10:18 +02:00
|
|
|
#else
|
2018-08-20 11:48:21 +02:00
|
|
|
TEST_ASSERT_TRUE (!zmq_has ("tipc"));
|
2014-06-18 15:10:18 +02:00
|
|
|
#endif
|
2017-01-19 20:50:18 +01:00
|
|
|
|
2014-06-18 15:10:18 +02:00
|
|
|
#if defined(ZMQ_HAVE_NORM)
|
2018-08-20 11:48:21 +02:00
|
|
|
TEST_ASSERT_TRUE (zmq_has ("norm"));
|
2014-06-18 15:10:18 +02:00
|
|
|
#else
|
2018-08-20 11:48:21 +02:00
|
|
|
TEST_ASSERT_TRUE (!zmq_has ("norm"));
|
2014-06-18 15:10:18 +02:00
|
|
|
#endif
|
2017-01-19 20:50:18 +01:00
|
|
|
|
2016-02-11 13:32:01 +01:00
|
|
|
#if defined(ZMQ_HAVE_CURVE)
|
2018-08-20 11:48:21 +02:00
|
|
|
TEST_ASSERT_TRUE (zmq_has ("curve"));
|
2014-06-18 15:10:18 +02:00
|
|
|
#else
|
2018-08-20 11:48:21 +02:00
|
|
|
TEST_ASSERT_TRUE (!zmq_has ("curve"));
|
2014-06-18 15:10:18 +02:00
|
|
|
#endif
|
2017-01-19 20:50:18 +01:00
|
|
|
|
2014-06-18 15:10:18 +02:00
|
|
|
#if defined(HAVE_LIBGSSAPI_KRB5)
|
2018-08-20 11:48:21 +02:00
|
|
|
TEST_ASSERT_TRUE (zmq_has ("gssapi"));
|
2014-06-18 15:10:18 +02:00
|
|
|
#else
|
2018-08-20 11:48:21 +02:00
|
|
|
TEST_ASSERT_TRUE (!zmq_has ("gssapi"));
|
2014-06-18 15:10:18 +02:00
|
|
|
#endif
|
|
|
|
|
2015-12-07 13:19:45 +01:00
|
|
|
#if defined(ZMQ_HAVE_VMCI)
|
2018-08-20 11:48:21 +02:00
|
|
|
TEST_ASSERT_TRUE (zmq_has ("vmci"));
|
2015-12-07 13:19:45 +01:00
|
|
|
#else
|
2018-08-20 11:48:21 +02:00
|
|
|
TEST_ASSERT_TRUE (!zmq_has ("vmci"));
|
2015-12-07 13:19:45 +01:00
|
|
|
#endif
|
|
|
|
|
2017-01-19 20:50:18 +01:00
|
|
|
#if defined(ZMQ_BUILD_DRAFT_API)
|
2018-08-20 11:48:21 +02:00
|
|
|
TEST_ASSERT_TRUE (zmq_has ("draft"));
|
2017-01-19 20:50:18 +01:00
|
|
|
#else
|
2018-08-20 11:48:21 +02:00
|
|
|
TEST_ASSERT_TRUE (!zmq_has ("draft"));
|
2017-01-19 20:50:18 +01:00
|
|
|
#endif
|
2018-08-20 11:48:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int main ()
|
|
|
|
{
|
|
|
|
setup_test_environment ();
|
|
|
|
|
|
|
|
UNITY_BEGIN ();
|
|
|
|
RUN_TEST (test_capabilities);
|
|
|
|
return UNITY_END ();
|
2014-06-18 15:10:18 +02:00
|
|
|
}
|