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

Solution: check for the available version instead
This commit is contained in:
Luca Boccassi 2019-02-04 08:54:58 +01:00 committed by Luca Boccassi
parent b20cb122d9
commit edf79dfefc
2 changed files with 7 additions and 3 deletions

View File

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

View File

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