#if defined(HAVE_LIBMEMCACHED) && HAVE_LIBMEMCACHED
#include <libmemcached-1.0/memcached.h>
#include <libmemcachedutil-1.0/ostream.hpp>
+#include <libtest/memcached.hpp>
#endif
#if defined(HAVE_LIBGEARMAN) && HAVE_LIBGEARMAN
noinst_HEADERS+= libtest/killpid.h
noinst_HEADERS+= libtest/libtool.hpp
noinst_HEADERS+= libtest/memcached.h
+noinst_HEADERS+= libtest/memcached.hpp
noinst_HEADERS+= libtest/poll_error.hpp
noinst_HEADERS+= libtest/port.h
noinst_HEADERS+= libtest/runner.h
libtest::Server *build_memcached_sasl_socket(const std::string& socket_file, const in_port_t try_port, const std::string& username, const std::string& password);
}
-
-#if defined(LIBMEMCACHED) && LIBMEMCACHED
-bool operator== (const memcached_st&c memc, const memcached_return_t rc)
-{
- if (memcached_last_error(&memc) == rc)
- {
- return true;
- }
-
- return false;
-}
-
-bool operator!= (const memcached_st&c memc, const memcached_return_t rc)
-{
- if (memcached_last_error(&memc) != rc)
- {
- return true;
- }
-
- return false;
-}
-#endif
#include <libhashkit-1.0/hashkit.h>
+#include <libtest/memcached.hpp>
+
#include <cerrno>
#include <memory>
#include <pthread.h>
global_pairs[x].key, global_pairs[x].key_length,
&blob[0], blob.size(),
time_t(0), uint32_t(0));
- test_true_got(rc == MEMCACHED_SUCCESS
- or rc == MEMCACHED_SERVER_MEMORY_ALLOCATION_FAILURE
- or rc == MEMCACHED_MEMORY_ALLOCATION_FAILURE, memcached_strerror(NULL, rc));
+ test_compare(*memc, MEMCACHED_SUCCESS);
+ test_compare(rc, MEMCACHED_SUCCESS);
}
return TEST_SUCCESS;
test_return_t binary_add_regression(memcached_st *memc)
{
test_skip(MEMCACHED_SUCCESS, memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, true));
- test_return_t rc= block_add_regression(memc);
-
- return rc;
+ return block_add_regression(memc);
}
test_return_t get_stats_keys(memcached_st *memc)