Commit Graph

14 Commits

Author SHA1 Message Date
Luca Boccassi
4f35d1af1a Problem: using BSD sockets in test is duplicated across many tests
Solution: refactor in testutil.lib, so that they can be used for fuzzers too
2020-04-26 17:59:26 +01:00
Simon Giesecke
af4fa22fd8 Problem: default test setUp/tearDown functions duplicated in many test programs
Solution: define setUp/tearDown functions via SETUP_TEARDOWN_TESTCONTEXT macro where possible
2019-03-24 12:53:12 -04:00
Simon Giesecke
1450830611 Problem: unused include directives
Solution: remove and add where needed
2019-03-23 09:46:37 -04:00
Luca Boccassi
98875a9ddc Problem: TCP and UDP test sockets use hard-coded port
Solution: move ephemeral port code to header and use it in both
tests
2019-03-18 23:27:01 +00:00
Simon Giesecke
00f4bd05be Problem: tests without test framework
Solution: migrate to unity
2018-12-16 12:28:42 -05:00
sigiesec
41f459e1dc Problem: formatting inconsistent
Solution: applied clang-format
2018-02-02 15:47:43 +01:00
Luca Boccassi
498c6bbb67 Problem: test_stream_exceeds_buffer cannot be ran in parallel
Solution: bind to wildcard and let the OS pick a free port instead
of using an hard-coded 12345 TCP port
2017-11-10 09:49:54 +00:00
Luca Boccassi
8325355d73 Problem: test_stream_exceeds_buffer has redundant includes
Solution: remove them as they are already in testutil.hpp
2016-12-06 20:33:46 +00:00
Pieter Hintjens
9c0d176d68 Problem: tests don't build on Windows
There were numerous small issues with test cases:

- some lacked the right source file header
- some were not portable at all
- some were using internal libzmq APIs (headers)

Solution: fixed and cleaned up.
2016-02-12 16:12:44 +01:00
Pieter Hintjens
bbcc79d188 Problem: tests don't build on Windows
There were numerous small issues with test cases:

- some lacked the right source file header
- some were not portable at all
- some were using internal libzmq APIs (headers)

Solution: fixed and cleaned up.
2016-02-12 15:48:37 +01:00
Michael
d06314df84 added windows includes as well as unix includes
added conditional includes for unix / windows
2016-02-06 23:19:10 +11:00
Jean-Christophe Fillion-Robin
46b02338e3 Style: Fix -Wunused-but-set-variable in test_stream_exceeds_buffer.cpp
This commit addresses the following warnings reported on gcc 5.2.1. In
the future, this will help reduce the "noise" and help catch warnings
revealing a serious problem.

8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---
/path/to/libzmq/tests/test_stream_exceeds_buffer.cpp: In function ‘int main()’:
/path/to/libzmq/tests/test_stream_exceeds_buffer.cpp:19:9: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
     int rc = setsockopt(server_sock, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(enable));
         ^
8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---
2016-01-30 02:56:03 -05:00
Pieter Hintjens
1fdf8f78e4 Cleaned up test case 2015-09-02 09:55:19 +02:00
Jens Auer
23797120ff Fixed #1477 corruption in "zero-copy" raw_decoder for payloads larger than 8192 bytes #1477
Fixed wrong message::init arguments.
2015-07-20 22:22:13 +02:00