X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Flibmemcached-1.0%2Fsasl.cc;h=041af2055ce12c7357a268c6f88d0f057a9d9430;hb=c0b779f4045f4858701b3741af805414bc066717;hp=1c3d4a9947e3238c623c10494fa466ba7214c339;hpb=5deca7af238185cfb53be80909b45ed807282b26;p=m6w6%2Flibmemcached diff --git a/tests/libmemcached-1.0/sasl.cc b/tests/libmemcached-1.0/sasl.cc index 1c3d4a99..041af205 100644 --- a/tests/libmemcached-1.0/sasl.cc +++ b/tests/libmemcached-1.0/sasl.cc @@ -34,8 +34,8 @@ * */ -#include -#include +#include "mem_config.h" +#include "libtest/test.hpp" using namespace libtest; @@ -43,14 +43,11 @@ using namespace libtest; Test cases */ -#include +#include "libmemcached-1.0/memcached.h" static test_return_t pre_sasl(memcached_st *) { - if (LIBMEMCACHED_WITH_SASL_SUPPORT == 0) - { - return TEST_SKIPPED; - } + SKIP_IF(LIBMEMCACHED_WITH_SASL_SUPPORT == 0); return TEST_SUCCESS; } @@ -63,6 +60,7 @@ static test_return_t pre_sasl(memcached_st *) */ static test_return_t sasl_auth_test(memcached_st *memc) { +#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT if (LIBMEMCACHED_WITH_SASL_SUPPORT) { test_compare(MEMCACHED_SUCCESS, memcached_set(memc, "foo", 3, "bar", 3, (time_t)0, (uint32_t)0)); @@ -79,6 +77,9 @@ static test_return_t sasl_auth_test(memcached_st *memc) memcached_quit(memc); return TEST_SUCCESS; } +#else + (void)memc; +#endif return TEST_SKIPPED; } @@ -99,12 +100,12 @@ collection_st collection[] ={ #include "tests/libmemcached_world.h" -void get_world(Framework *world) +void get_world(libtest::Framework* world) { - world->collections= collection; + world->collections(collection); - world->_create= (test_callback_create_fn*)world_create; - world->_destroy= (test_callback_destroy_fn*)world_destroy; + world->create((test_callback_create_fn*)world_create); + world->destroy((test_callback_destroy_fn*)world_destroy); world->set_runner(new LibmemcachedRunner);