Commit edf79dfe authored by Luca Boccassi's avatar Luca Boccassi Committed by Luca Boccassi

Problem: test_monitor check for DRAFT has to be kept up to date

Solution: check for the available version instead
parent b20cb122
......@@ -116,7 +116,8 @@ void test_monitor_basic ()
test_context_socket_close_zero_linger (server_mon);
}
#ifdef ZMQ_BUILD_DRAFT_API
#if (defined ZMQ_CURRENT_EVENT_VERSION && ZMQ_CURRENT_EVENT_VERSION >= 2) || \
(defined ZMQ_CURRENT_EVENT_VERSION && ZMQ_CURRENT_EVENT_VERSION_DRAFT >= 2)
void test_monitor_versioned_basic (bind_function_t bind_function_,
const char *expected_prefix_)
{
......@@ -240,7 +241,8 @@ int main ()
RUN_TEST (test_monitor_invalid_protocol_fails);
RUN_TEST (test_monitor_basic);
#ifdef ZMQ_BUILD_DRAFT_API
#if (defined ZMQ_CURRENT_EVENT_VERSION && ZMQ_CURRENT_EVENT_VERSION >= 2) || \
(defined ZMQ_CURRENT_EVENT_VERSION && ZMQ_CURRENT_EVENT_VERSION_DRAFT >= 2)
RUN_TEST (test_monitor_versioned_basic_tcp_ipv4);
RUN_TEST (test_monitor_versioned_basic_tcp_ipv6);
RUN_TEST (test_monitor_versioned_basic_ipc);
......
......@@ -190,7 +190,9 @@ int expect_monitor_event_multiple (void *server_mon_,
return count_of_expected_events;
}
#ifdef ZMQ_BUILD_DRAFT_API
#if (defined ZMQ_CURRENT_EVENT_VERSION && ZMQ_CURRENT_EVENT_VERSION >= 2) \
|| (defined ZMQ_CURRENT_EVENT_VERSION \
&& ZMQ_CURRENT_EVENT_VERSION_DRAFT >= 2)
static int64_t get_monitor_event_internal_v2 (void *monitor_,
uint64_t *value_,
char **local_address_,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment