Fix for using correct memcached binary.
[awesomized/libmemcached] / tests / plus.cpp
index eba08c08d56460a7ae71cec10c72906fc76bb9c9..0d588749c0404d3aa8ef90320c380aaeb94df0a2 100644 (file)
@@ -29,7 +29,7 @@ extern "C" {
    test_return_t mget_result_function(memcached_st *memc);
    test_return_t basic_behavior(memcached_st *memc);
    test_return_t mget_test(memcached_st *memc);
-   memcached_return_t callback_counter(memcached_st *,
+   memcached_return_t callback_counter(const memcached_st *,
                                        memcached_result_st *,
                                        void *context);
 }
@@ -150,9 +150,9 @@ test_return_t basic_master_key_test(memcached_st *memc)
 }
 
 /* Count the results */
-memcached_return_t callback_counter(memcached_st *,
-                                  memcached_result_st *,
-                                  void *context)
+memcached_return_t callback_counter(const memcached_st *,
+                                    memcached_result_st *,
+                                    void *context)
 {
   unsigned int *counter= static_cast<unsigned int *>(context);
 
@@ -299,12 +299,18 @@ collection_st collection[] ={
 void get_world(world_st *world)
 {
   world->collections= collection;
-  world->test_startup= reinterpret_cast<test_callback_fn>(world_test_startup);
-  world->flush= reinterpret_cast<test_callback_fn>(world_flush);
-  world->pre_run= reinterpret_cast<test_callback_fn>(world_pre_run);
+
   world->create= reinterpret_cast<test_callback_create_fn>(world_create);
-  world->post_run= reinterpret_cast<test_callback_fn>(world_post_run);
-  world->on_error= reinterpret_cast<test_callback_error_fn>(world_on_error);
   world->destroy= reinterpret_cast<test_callback_fn>(world_destroy);
+
+  world->test.startup= reinterpret_cast<test_callback_fn>(world_test_startup);
+  world->test.flush= reinterpret_cast<test_callback_fn>(world_flush);
+  world->test.pre_run= reinterpret_cast<test_callback_fn>(world_pre_run);
+  world->test.post_run= reinterpret_cast<test_callback_fn>(world_post_run);
+  world->test.on_error= reinterpret_cast<test_callback_error_fn>(world_on_error);
+
+  world->collection.startup= reinterpret_cast<test_callback_fn>(world_container_startup);
+  world->collection.shutdown= reinterpret_cast<test_callback_fn>(world_container_shutdown);
+
   world->runner= &defualt_libmemcached_runner;
 }