Commit Graph

23 Commits

Author SHA1 Message Date
Alberto Invernizzi
3d86f2a288 remove duplicated include Catch 2021-06-30 08:30:36 +02:00
Alberto Invernizzi
197f8d2516 update cmake for catch2 2021-06-30 07:14:13 +02:00
Brett Viren
10431084bb
Problem: lack conversion message_t and multipart_t (#391)
Solution: add encode/decode methods to multipart_t giving a codec compatible with the CZMQ equivalent.
2020-03-20 10:59:15 +01:00
Gudmundur Adalsteinsson
505edeb336 Problem: Handling multipart messages is complex
Solution: Add generic algorithms for sending and receiving multipart
messages.
2019-10-26 19:59:46 +00:00
Gudmundur Adalsteinsson
f412ea9e34 Improved range detection supporting ADL 2019-05-31 12:09:20 +00:00
Gudmundur Adalsteinsson
3d4be814e8 Problem: send/recv functions lack type-safety
Solution: Add functions taking buffers and enum class flags
2019-05-05 22:05:47 +00:00
Gudmundur Adalsteinsson
c6a3529cd1 Problem: No type-safe alternatives when polling or needing a reference to a socket
Solution: Introduce a socket_ref that is a non-owning nullable reference to a socket
2019-04-19 22:10:26 +00:00
Pawel Kurdybacha
6982fb7017 Problem #268: CTest output without tests details
Solution: Added integration with CTest to existing unit test framework
based on Catch. ctest -v returns list of run tests now.

Changes:

* downloading and using Catch cmake modules that `unit_tests
--list-test-names-only` for add_test internally
2019-01-23 08:48:11 +00:00
Pawel Kurdybacha
6a6aebb845 Problem #284: test pthread link error with with gcc
Solution: Use Threads cmake module as suggested in this thread:
https://cmake.org/pipermail/cmake/2016-February/062729.html

I was able to reproduce with gcc 8.2.1 and cmake 3.13.2.
2019-01-22 20:55:06 +00:00
Pawel Kurdybacha
ae15964907 Problem: Dependency on googletest framework
Currently cppzmq as relatively simple and header only library depends on rather
complex unit test framework googletest.
Current issues:
- Googletest requires downloading and building it every time on travis
as cache support is limited there
- Googletest build is signifficant with comparison to cppzmq unittests
total runtime

Solution: Port existing tests to Catch - header only C++ framework and
gain ~20% build speed up on travis.

Why Catch?
It is well know C++ header only testing framework. It works well, it is
being kept up to date and maintainers seem to pay attention to
community's comments and issues.
We can not use Catch2 currently as we still support pre-C++11 compilers.
2018-10-17 15:22:07 +01:00
Simon Giesecke
ec63fb3485 Problem: no test case for zmq::monitor_t::init
Solution: added test case
2018-06-05 17:27:28 +02:00
Pawel Kurdybacha
9a7a85703c Problem: Coverage with coveralls not working
Solution: Enable coveralls for one linux build target and fix coveralls
configuration.
2018-06-03 19:09:44 +01:00
Pawel Kurdybacha
a5578a6f25 Problem: libzmq 4.2.0 cmake build broken
It seems that there is a bug in libzmq 4.2.0 cmake configs that prevents
linking to it without installing.

Solution: disable libzmq 4.2.0 for cmake builds
2018-05-13 15:30:56 +01:00
Pawel Kurdybacha
3dc20bb05a Problem: libzmq builds with tests
libzmq build with default settings now which build all the tests and
performance tools. This is not required for cppzmq build and slows down
it only.

Solution: disable tests build for libzmq and make it release only.
2018-05-13 15:30:56 +01:00
Simon Giesecke
762b0131e8 Problem: no tests for poller_t
Solution: add tests
2018-05-11 12:31:17 +02:00
Simon Giesecke
882f5e844c Problem: extra abstraction layer type poller_t is in zmq.hpp
Solution: move to zmq_addon.hpp, rename to active_poller_t, and rename base_poller_t to poller_t
2018-05-11 11:33:53 +02:00
Simon Giesecke
dc996cd2ec Problem: zmq_addon header contains tests (with a syntax error)
Solution: convert to googletest based test, and fix syntax error
2018-05-11 11:33:53 +02:00
Pawel Kurdybacha
6caa5d19d3 Problem: message_t should be easier to construct
* Added overload constructor (c++11 only) taking iteratable object.
  It would be easier to use std::string, std::array etc to construct
  a message now. Making it a draft for now in case it is too greedy
  and needs to be more specialize.
* Added equal and not euqal operator to message_t as a recommended
  and expected way of comparing objects in C++.
* deprecated C style equal method as operator== should be used instead
  (point above).
* Added message_t test covering all available message_t's constructors
2018-04-14 12:13:44 +01:00
Simon Giesecke
cc5f4050dc Problem: no build/tests with DRAFT
Solution: added initial test case
2018-04-03 18:41:44 +02:00
Simon Giesecke
1616c0fad2 Problem: test file not correctly named
Solution: move and split example_add.cpp
2018-04-03 18:41:44 +02:00
Simon Giesecke
63f81e40d6 Problem: code coverage not working
Solution: build tests within cppzmq build, and add separate demo
2018-04-03 18:41:32 +02:00
Simon Giesecke
07b583a99a Problem: test not using cppzmq
Solution: add dependency on cppzmq
2018-03-29 18:46:04 +02:00
Simon Giesecke
968473cdba Problem: no test infrastructure
Solution: integrate googletest, with non-cppzmq test case for a start
2018-03-29 18:11:28 +02:00