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:
Simon Giesecke
2019-03-24 12:51:28 -04:00
parent 2b80dd7add
commit af4fa22fd8
87 changed files with 92 additions and 851 deletions

View File

@@ -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