mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-30 13:47:13 +01:00
Problem: default test setUp/tearDown functions duplicated in many test programs
Solution: define setUp/tearDown functions via SETUP_TEARDOWN_TESTCONTEXT macro where possible
This commit is contained in:
@@ -181,6 +181,12 @@ void recv_array_expect_success (void *socket_,
|
||||
// for each test case, and some consistency checks can be performed.
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Use this is an test executable to perform a default setup and teardown of
|
||||
// the test context, which is appropriate for many libzmq test cases.
|
||||
#define SETUP_TEARDOWN_TESTCONTEXT \
|
||||
void setUp () { setup_test_context (); } \
|
||||
void tearDown () { teardown_test_context (); }
|
||||
|
||||
// The maximum number of sockets that can be managed by the test context.
|
||||
#define MAX_TEST_SOCKETS 128
|
||||
|
||||
|
||||
Reference in New Issue
Block a user