libzmq/tests
sigiesec 5f854a31b7 Problem: test_security_curve not using test framework
Solution: use unity in test_security_curve
2018-02-11 17:25:36 +00:00
..
CMakeLists.txt Problem: no test framework 2018-02-11 17:25:36 +00:00
README.md Fixed issue #2286 by documentation 2017-01-01 19:08:28 +01:00
test_abstract_ipc.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_ancillaries.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_atomics.cpp Problem: copyright year is still 2015 2016-01-28 15:07:31 +01:00
test_base85.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_bind_after_connect_tcp.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_bind_src_address.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_capabilities.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_client_server.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_conflate.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_connect_delay_tipc.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_connect_resolve.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_connect_rid.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_ctx_destroy.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_ctx_options.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_dgram.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_diffserv.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_disconnect_inproc.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_filter_ipc.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_fork.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_getsockopt_memset.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_heartbeats.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_hwm_pubsub.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_hwm.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_immediate.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_inproc_connect.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_invalid_rep.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_iov.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_ipc_wildcard.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_issue_566.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_last_endpoint.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_many_sockets.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_metadata.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_monitor.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_msg_ffn.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_msg_flags.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_pair_inproc.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_pair_ipc.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_pair_tcp.cpp Problem: use of TCP loopback fastpath not available for user sockets 2018-02-09 14:22:42 +01:00
test_pair_tipc.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_pair_vmci.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_poller.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_probe_router.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_proxy_single_socket.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_proxy_terminate.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_proxy.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_pub_invert_matching.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_radio_dish.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_rebind_ipc.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_reconnect_ivl.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_req_correlate.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_req_relaxed.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_reqrep_device_tipc.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_reqrep_device.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_reqrep_inproc.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_reqrep_ipc.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_reqrep_tcp.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_reqrep_tipc.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_reqrep_vmci.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_router_handover.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_router_mandatory_hwm.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_router_mandatory_tipc.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_router_mandatory.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_scatter_gather.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_security_curve.cpp Problem: test_security_curve not using test framework 2018-02-11 17:25:36 +00:00
test_security_gssapi.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_security_null.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_security_plain.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_security_zap.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_setsockopt.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_shutdown_stress_tipc.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_shutdown_stress.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_socket_null.cpp Problem: test_socket_null not using test framework 2018-02-11 17:25:36 +00:00
test_sockopt_hwm.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_sodium.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_spec_dealer.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_spec_pushpull.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_spec_rep.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_spec_req.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_spec_router.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_srcfd.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_stream_disconnect.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_stream_empty.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_stream_exceeds_buffer.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_stream_timeout.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_stream.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_sub_forward_tipc.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_sub_forward.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_system.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_term_endpoint_tipc.cpp tipc: add support for address domain suffix 2016-05-11 21:54:25 +02:00
test_term_endpoint.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_thread_safe.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_timeo.cpp Problem: test_timeo frequently fails on travis, probably because of slow 2018-02-09 09:56:38 +01:00
test_timers.cpp Problem: DRAFT build broken with GCC 4.7 2018-02-10 17:08:01 +00:00
test_udp.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_unbind_inproc.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_unbind_wildcard.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_use_fd_ipc.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_use_fd_tcp.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_xpub_manual.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_xpub_nodrop.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_xpub_welcome_msg.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
test_zmq_poll_fd.cpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
testutil_security.hpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00
testutil.hpp Problem: formatting inconsistent 2018-02-02 15:47:43 +01:00

Guidelines for tests

Write your test case as if you were writing clean application code. It should be safe to compile on all platforms.

The only include file you should use is testutil.hpp. Do not include files from src. Do not use the internal libzmq API or your test case is fair game to be deleted.

If you must write non-portable code, wrap it in #ifdefs to ensure it will compile and run on all systems.

Note that testutil.hpp includes platform.h. Do not include it yourself as it changes location depending on the build system and OS.

All sources must contain the correct header. Please copy from test_system.cpp if you're not certain.

Please use only ANSI C99 in test cases, no C++. This is to make the code more reusable.

On many slower environments, like embedded systems, VMs or CI systems, test might fail because it takes time for sockets to settle after a connect. If you need to add a sleep, please be consistent with all the other tests and use: msleep (SETTLE_TIME);

Building tests in Windows

According to the version of your compiler, you should adapt the path libzmq.lib in the file tests/CMakeLists.txt.

Install CMAKE CMD> CMAKE libzmq/tests CMD> tests.sln CMD> # build all projects in the solution