Commit Graph

15 Commits

Author SHA1 Message Date
Simon Giesecke
799c89cb09 Problem: several test cases mixed in message.constructors
Solution: split up into test cases for various ctors and equality operators
2018-04-13 11:20:07 -04:00
Pawel Kurdybacha
f518a648ef Problem: extended initializer lists only available in C++11 2018-04-14 14:06:32 +01: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
Pawel Kurdybacha
40c55018b2 Problem: create_destroy test not assigned properly 2018-04-13 17:38:51 +01:00
Pawel Kurdybacha
8353e8460f Problem: non consistent whitespace formatting
* Converted tabs to to 4 spaces to be consistend with the rest of the
code
* Stripped white spaces from the end of lines
2018-04-13 17:35:41 +01:00
Simon Giesecke
5b1ab44264 Problem: insufficient tests for poller_t, bad usability since caller of add must store function object
Solution: added tests, added size() method, added add deprecated overload with former signature, changed new add signature to accept handler by value
2018-04-13 16:24:46 +02:00
Pawel Kurdybacha
1975818171 Problem: poller's handler not aware of event type. (#200)
* Problem: Poller's handler not aware of event type.

It was possible to register a handler for more than one event types but
impossible to distinguish which event is being handled.
Now events are passed to a handler.

Besides that some other changes:
* new test covering changes in the poller
* modified existing tests to cover changes in the poller
* defined handler_t in poller_t scope for more convinient use
  and simpler code
* helper loopback binder to be re-used in tests

* Problem: CMake build fails on Windows

Issue #199

It seems that with GCC on Linux <array> is implicitly included
by one of stl includes already in zmq.hpp but it breaks on Windows
with Visual Studio.

Adding explicit include for array.

Can not verify right now but this change is a good practice
so creating a pull request.

* Poller: array include not between C++11 guards
2018-04-09 08:22:31 +01:00
Pawel Kurdybacha
18f8035ba8 Problem: poller_t does not have great test coverage
@sigiesec's recent commits with gtests and basics tests for zmq
types (thanks for that!) makes it too convinient to not add some more tests.

* Adding some simple tests for poller_t
* Stripped whitespaces from poller implementation.
2018-04-07 23:00:10 +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
83f854869a Problem: no tests for socket_t ctor accepting enum socket_type
Solution: added 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
b737b9f1de Problem: no test cases
Solution: added a few initial test cases
2018-04-02 14:13:05 +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