Commit Graph

21 Commits

Author SHA1 Message Date
Stephan Schim
dd67d56eae unit test for active_poller and poller_t support for file descriptors 2023-07-19 17:06:48 +02:00
Gudmundur Adalsteinsson
11bbef7d2b Tests require full 11 support 2021-07-13 22:56:19 +00:00
Alberto Invernizzi
eddeaf44ca fix CHECK_THROWS_AS usage
"Note that the exception type is extended with const& and you should not include it yourself."

according to https://github.com/catchorg/Catch2/blob/devel/docs/assertions.md#exceptions
2021-06-30 07:14:13 +02:00
Gudmundur Adalsteinsson
d237615a25 Problem: Active poller double add mutates handler
Solution: Check if socket already added before storing.
2020-09-06 13:46:08 +00:00
Gudmundur Adalsteinsson
8b64a341ac Add requirement that the handler is non-null in active_poller 2020-05-24 22:38:35 +00:00
Gudmundur Adalsteinsson
e9c5546e04 Add CHECK_THROWS_ZMQ_ERROR and check error codes 2020-05-24 22:16:55 +00:00
Gudmundur Adalsteinsson
d2c5fef2c1 Apply clang-format 2020-05-24 21:53:56 +00:00
Gudmundur Adalsteinsson
76e6bacc80 Move string literal into variable 2020-05-16 13:22:52 +00:00
Simon Giesecke
b6c79eb0c8 Reformat all files with clang-format 2020-01-28 11:11:31 +01:00
Gudmundur Adalsteinsson
0458f7d16c Problem: Type-safety of poller_t and active_poller_t can be improved (#318)
Problem: Type-safety of poller_t and active_poller_t can be improved
2019-05-15 08:35:12 +02: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
c2e595bc69 Problem: Compiler warning in tests
Solution: Fix some compiler warnings
2019-04-14 21:34:15 +00:00
Simon Giesecke
4043617afe Problem: test cases for error behaviour of (active_)poller_t failing with libzmq 4.3.x
Solution: adapt test cases to changed behaviour
2019-02-04 15:25:35 +01: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
ab09f5da98 Problem: addition of new single-argument message_t introduces ambiguity when calling e.g. socket_t::send
Solution: make single-argument constructor explicit
2018-08-21 13:50:02 +02:00
Pawel Kurdybacha
ff3c221516 Problem: whitespace style too restrictive.
For header only library like cppzmq, whitespace style inherited from
libzmq is too restrictive.

Solution: relaxing whitespace before parens from always to in control
statements only, increased max column width from 80 to 85 and removing
requirement of whitespace after template keyword.
2018-05-12 17:28:28 +01:00
Pawel Kurdybacha
5031278f18 Problem: project files do not follow clang-format 2018-05-11 20:29:15 +01:00
Simon Giesecke
421d66c97e Problem: redundant assertion
Solution: removed redundant assertion
2018-05-11 12:31:17 +02:00
Simon Giesecke
762b0131e8 Problem: no tests for poller_t
Solution: add tests
2018-05-11 12:31:17 +02:00
Simon Giesecke
ee1cc9a791 Problem: unnecessary heap allocations for test subject
Solution: change to local variables
2018-05-11 11:33:54 +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