X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fmemstat.cc;h=516ff7d91b5105305ed3e1132e067e6eead88ad7;hb=a70063f77b25d8b77ddbc2c145c2b812c31cc01c;hp=6bb8c053bd5f685f64446f7b99a4993c63314312;hpb=64e9fa38f42f0d30463da5ddc3a573619941d93a;p=awesomized%2Flibmemcached diff --git a/tests/memstat.cc b/tests/memstat.cc index 6bb8c053..516ff7d9 100644 --- a/tests/memstat.cc +++ b/tests/memstat.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/memstat"); +static std::string executable("./src/bin/memstat"); static test_return_t help_test(void *) { @@ -107,25 +107,24 @@ collection_st collection[] ={ static void *world_create(server_startup_st& servers, test_return_t& error) { - if (HAVE_MEMCACHED_BINARY == 0) + if (libtest::has_memcached() == false) { error= TEST_SKIPPED; return NULL; } - const char *argv[1]= { "memstat" }; - if (server_startup(servers, "memcached", libtest::default_port(), 1, argv) == false) + if (server_startup(servers, "memcached", libtest::default_port(), NULL) == false) { - error= TEST_FAILURE; + error= TEST_SKIPPED; } return &servers; } -void get_world(Framework *world) +void get_world(libtest::Framework* world) { - world->collections= collection; - world->_create= world_create; + world->collections(collection); + world->create(world_create); }