X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fmemdump.cc;h=0ad421f14b3310d179d763eddee12ba56203fc18;hb=43032f572a83233b5183ed6989921efe930aa719;hp=2a5023712f478461efe7b5d6471e1cf2c618ec3b;hpb=eb3945ce9820053036c315bd5faae7af83977217;p=m6w6%2Flibmemcached diff --git a/tests/memdump.cc b/tests/memdump.cc index 2a502371..0ad421f1 100644 --- a/tests/memdump.cc +++ b/tests/memdump.cc @@ -39,10 +39,10 @@ Test that we are cycling the servers we are creating during testing. */ -#include +#include "mem_config.h" -#include -#include +#include "libtest/test.hpp" +#include "libmemcached-1.0/memcached.h" using namespace libtest; @@ -50,7 +50,7 @@ using namespace libtest; #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif -static std::string executable("./clients/memdump"); +static std::string executable("./src/bin/memdump"); static test_return_t help_test(void *) { @@ -111,19 +111,11 @@ collection_st collection[] ={ {0, 0, 0, 0} }; -static void *world_create(server_startup_st& servers, test_return_t& error) +static void *world_create(server_startup_st& servers, test_return_t&) { - if (libtest::has_memcached() == false) - { - error= TEST_SKIPPED; - return NULL; - } - - if (server_startup(servers, "memcached", libtest::default_port(), NULL) == false) - { - error= TEST_FAILURE; - return NULL; - } + SKIP_UNLESS(libtest::has_memcached()); + + ASSERT_TRUE(server_startup(servers, "memcached", libtest::default_port(), NULL)); return &servers; }