X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fmem_udp.cc;h=d59244715f7e127af7812487c9d8bfe5a6b8f245;hb=76bf27c007d5015d3dcf2981c942d8afb2e97302;hp=1ef95becad18fca438ada9365fbdc764f59d3331;hpb=1054bac0d64844c968d1dcb6d5478315bfd4d7a8;p=awesomized%2Flibmemcached diff --git a/tests/mem_udp.cc b/tests/mem_udp.cc index 1ef95bec..d5924471 100644 --- a/tests/mem_udp.cc +++ b/tests/mem_udp.cc @@ -40,7 +40,7 @@ Sample test application. */ -#include +#include #include using namespace libtest; @@ -51,7 +51,6 @@ using namespace libtest; #include #include -#include #include #include #include @@ -64,6 +63,8 @@ using namespace libtest; #include +#include "libmemcached/instance.hpp" + #ifndef __INTEL_COMPILER #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif @@ -563,24 +564,14 @@ collection_st collection[] ={ {0, 0, 0, 0} }; -#define TEST_PORT_BASE MEMCACHED_DEFAULT_PORT +10 #include "tests/libmemcached_world.h" -void get_world(Framework *world) +void get_world(libtest::Framework* world) { - world->collections= collection; - - world->_create= (test_callback_create_fn*)world_create; - world->_destroy= (test_callback_destroy_fn*)world_destroy; - - world->item._startup= (test_callback_fn*)world_test_startup; - world->item._flush= (test_callback_fn*)world_flush; - world->item.set_pre((test_callback_fn*)world_pre_run); - world->item.set_post((test_callback_fn*)world_post_run); - world->_on_error= (test_callback_error_fn*)world_on_error; + world->collections(collection); - world->collection_startup= (test_callback_fn*)world_container_startup; - world->collection_shutdown= (test_callback_fn*)world_container_shutdown; + world->create((test_callback_create_fn*)world_create); + world->destroy((test_callback_destroy_fn*)world_destroy); - world->set_runner(&defualt_libmemcached_runner); + world->set_runner(new LibmemcachedRunner); }