X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ffunction.c;h=149392150bc3e2111e5bb902e7a89638ea309a7b;hb=15db4f3f26e02d62e8cd769391e73cb57089aa1c;hp=3bff805cb0b0e1ab77b49fe4997dfa4e09798af1;hpb=89eed63d9bf97065589679c45a3095088c4bb150;p=m6w6%2Flibmemcached diff --git a/tests/function.c b/tests/function.c index 3bff805c..14939215 100644 --- a/tests/function.c +++ b/tests/function.c @@ -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} };