From: Michael Wallner Date: Mon, 2 Nov 2020 15:16:13 +0000 (+0100) Subject: show any system error (errno) X-Git-Tag: 1.1.0-beta1~133 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=f582c2592afd7a1f5692f482e62d67ca34540fec;p=m6w6%2Flibmemcached show any system error (errno) --- diff --git a/test/tests/memcached/regression/lp_000-583-031.cpp b/test/tests/memcached/regression/lp_000-583-031.cpp index b6d18870..243c884e 100644 --- a/test/tests/memcached/regression/lp_000-583-031.cpp +++ b/test/tests/memcached/regression/lp_000-583-031.cpp @@ -1,18 +1,20 @@ #include "test/lib/common.hpp" +#include "test/lib/ReturnMatcher.hpp" TEST_CASE("memcached_regression_lp583031") { MemcachedPtr memc; + LoneReturnMatcher test{*memc}; - REQUIRE(MEMCACHED_SUCCESS == memcached_server_add(*memc, "192.0.2.1", 11211)); - REQUIRE(MEMCACHED_SUCCESS == memcached_behavior_set(*memc, MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT, 3000)); - REQUIRE(MEMCACHED_SUCCESS == memcached_behavior_set(*memc, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, 1000)); - REQUIRE(MEMCACHED_SUCCESS == memcached_behavior_set(*memc, MEMCACHED_BEHAVIOR_SND_TIMEOUT, 1000)); - REQUIRE(MEMCACHED_SUCCESS == memcached_behavior_set(*memc, MEMCACHED_BEHAVIOR_RCV_TIMEOUT, 1000)); - REQUIRE(MEMCACHED_SUCCESS == memcached_behavior_set(*memc, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, 1000)); - REQUIRE(MEMCACHED_SUCCESS == memcached_behavior_set(*memc, MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT, 3)); + REQUIRE_SUCCESS(memcached_server_add(*memc, "192.0.2.1", 11211)); + REQUIRE_SUCCESS(memcached_behavior_set(*memc, MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT, 3000)); + REQUIRE_SUCCESS(memcached_behavior_set(*memc, MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, 1000)); + REQUIRE_SUCCESS(memcached_behavior_set(*memc, MEMCACHED_BEHAVIOR_SND_TIMEOUT, 1000)); + REQUIRE_SUCCESS(memcached_behavior_set(*memc, MEMCACHED_BEHAVIOR_RCV_TIMEOUT, 1000)); + REQUIRE_SUCCESS(memcached_behavior_set(*memc, MEMCACHED_BEHAVIOR_POLL_TIMEOUT, 1000)); + REQUIRE_SUCCESS(memcached_behavior_set(*memc, MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT, 3)); memcached_return_t rc; Malloced val(memcached_get(*memc, S("not-found"), nullptr, nullptr, &rc)); - REQUIRE(MEMCACHED_TIMEOUT == rc); + REQUIRE_RC(MEMCACHED_TIMEOUT, rc); REQUIRE_FALSE(*val); }