Merge of latest - callback commit needed
[m6w6/libmemcached] / tests / function.c
index 3bff805cb0b0e1ab77b49fe4997dfa4e09798af1..149392150bc3e2111e5bb902e7a89638ea309a7b 100644 (file)
@@ -889,6 +889,14 @@ uint8_t get_stats_keys(memcached_st *memc)
  return 0;
 }
 
+uint8_t version_string_test
+{
+  const char *version_string;
+  version_string= memcached_lib_version();
+  assert(!strcmp(version_string, LIBMEMCACHE_VERSION_STRING));
+  return 0;
+}
+
 uint8_t get_stats(memcached_st *memc)
 {
  unsigned int x;
@@ -975,23 +983,23 @@ uint8_t callback_test(memcached_st *memc)
 
   /* Test Clone Callback */
   {
-    clone_func temp_function;
+    memcached_clone_func temp_function;
     memcached_return rc;
 
     rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION, clone_test_callback);
     assert(rc == MEMCACHED_SUCCESS);
-    temp_function= (clone_func)memcached_callback_get(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION, &rc);
+    temp_function= (memcached_clone_func)memcached_callback_get(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION, &rc);
     assert(temp_function == clone_test_callback);
   }
 
   /* Test Cleanup Callback */
   {
-    cleanup_func temp_function;
+    memcached_cleanup_func temp_function;
     memcached_return rc;
 
     rc= memcached_callback_set(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION, cleanup_test_callback);
     assert(rc == MEMCACHED_SUCCESS);
-    temp_function= (cleanup_func)memcached_callback_get(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION, &rc);
+    temp_function= (memcached_cleanup_func)memcached_callback_get(memc, MEMCACHED_CALLBACK_CLONE_FUNCTION, &rc);
     assert(temp_function == cleanup_test_callback);
   }
 
@@ -2174,6 +2182,7 @@ test_st tests[] ={
   {"get_stats_keys", 0, get_stats_keys },
   {"behavior_test", 0, get_stats_keys },
   {"callback_test", 0, get_stats_keys },
+  {"version_string_test", 0, version_string_test},
   {0, 0, 0}
 };