mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-27 19:10:22 +01:00
Problem: test_capabilities not yet using unity
Solution: migrate to unity
This commit is contained in:
@@ -647,7 +647,8 @@ tests_test_metadata_SOURCES = tests/test_metadata.cpp
|
|||||||
tests_test_metadata_LDADD = src/libzmq.la
|
tests_test_metadata_LDADD = src/libzmq.la
|
||||||
|
|
||||||
tests_test_capabilities_SOURCES = tests/test_capabilities.cpp
|
tests_test_capabilities_SOURCES = tests/test_capabilities.cpp
|
||||||
tests_test_capabilities_LDADD = src/libzmq.la
|
tests_test_capabilities_LDADD = src/libzmq.la ${UNITY_LIBS}
|
||||||
|
tests_test_capabilities_CPPFLAGS = ${UNITY_CPPFLAGS}
|
||||||
|
|
||||||
tests_test_xpub_nodrop_SOURCES = tests/test_xpub_nodrop.cpp
|
tests_test_xpub_nodrop_SOURCES = tests/test_xpub_nodrop.cpp
|
||||||
tests_test_xpub_nodrop_LDADD = src/libzmq.la ${UNITY_LIBS}
|
tests_test_xpub_nodrop_LDADD = src/libzmq.la ${UNITY_LIBS}
|
||||||
|
|||||||
@@ -28,55 +28,72 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "testutil.hpp"
|
#include "testutil.hpp"
|
||||||
|
#include "testutil_unity.hpp"
|
||||||
|
|
||||||
int main (void)
|
void setUp ()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void tearDown ()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void test_capabilities ()
|
||||||
{
|
{
|
||||||
#if !defined(ZMQ_HAVE_WINDOWS) && !defined(ZMQ_HAVE_OPENVMS)
|
#if !defined(ZMQ_HAVE_WINDOWS) && !defined(ZMQ_HAVE_OPENVMS)
|
||||||
assert (zmq_has ("ipc"));
|
TEST_ASSERT_TRUE (zmq_has ("ipc"));
|
||||||
#else
|
#else
|
||||||
assert (!zmq_has ("ipc"));
|
TEST_ASSERT_TRUE (!zmq_has ("ipc"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ZMQ_HAVE_OPENPGM)
|
#if defined(ZMQ_HAVE_OPENPGM)
|
||||||
assert (zmq_has ("pgm"));
|
TEST_ASSERT_TRUE (zmq_has ("pgm"));
|
||||||
#else
|
#else
|
||||||
assert (!zmq_has ("pgm"));
|
TEST_ASSERT_TRUE (!zmq_has ("pgm"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ZMQ_HAVE_TIPC)
|
#if defined(ZMQ_HAVE_TIPC)
|
||||||
assert (zmq_has ("tipc"));
|
TEST_ASSERT_TRUE (zmq_has ("tipc"));
|
||||||
#else
|
#else
|
||||||
assert (!zmq_has ("tipc"));
|
TEST_ASSERT_TRUE (!zmq_has ("tipc"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ZMQ_HAVE_NORM)
|
#if defined(ZMQ_HAVE_NORM)
|
||||||
assert (zmq_has ("norm"));
|
TEST_ASSERT_TRUE (zmq_has ("norm"));
|
||||||
#else
|
#else
|
||||||
assert (!zmq_has ("norm"));
|
TEST_ASSERT_TRUE (!zmq_has ("norm"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ZMQ_HAVE_CURVE)
|
#if defined(ZMQ_HAVE_CURVE)
|
||||||
assert (zmq_has ("curve"));
|
TEST_ASSERT_TRUE (zmq_has ("curve"));
|
||||||
#else
|
#else
|
||||||
assert (!zmq_has ("curve"));
|
TEST_ASSERT_TRUE (!zmq_has ("curve"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_LIBGSSAPI_KRB5)
|
#if defined(HAVE_LIBGSSAPI_KRB5)
|
||||||
assert (zmq_has ("gssapi"));
|
TEST_ASSERT_TRUE (zmq_has ("gssapi"));
|
||||||
#else
|
#else
|
||||||
assert (!zmq_has ("gssapi"));
|
TEST_ASSERT_TRUE (!zmq_has ("gssapi"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ZMQ_HAVE_VMCI)
|
#if defined(ZMQ_HAVE_VMCI)
|
||||||
assert (zmq_has ("vmci"));
|
TEST_ASSERT_TRUE (zmq_has ("vmci"));
|
||||||
#else
|
#else
|
||||||
assert (!zmq_has ("vmci"));
|
TEST_ASSERT_TRUE (!zmq_has ("vmci"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ZMQ_BUILD_DRAFT_API)
|
#if defined(ZMQ_BUILD_DRAFT_API)
|
||||||
assert (zmq_has ("draft"));
|
TEST_ASSERT_TRUE (zmq_has ("draft"));
|
||||||
#else
|
#else
|
||||||
assert (!zmq_has ("draft"));
|
TEST_ASSERT_TRUE (!zmq_has ("draft"));
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
}
|
||||||
|
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
setup_test_environment ();
|
||||||
|
|
||||||
|
UNITY_BEGIN ();
|
||||||
|
RUN_TEST (test_capabilities);
|
||||||
|
return UNITY_END ();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user