X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Flibmemcached-1.0%2Fsasl.cc;h=041af2055ce12c7357a268c6f88d0f057a9d9430;hb=43032f572a83233b5183ed6989921efe930aa719;hp=0ae101f2925f4855b574dad9c04386a5e1c18895;hpb=cf55f693c7fc7693afbb4594d97d23795cf7f2a0;p=m6w6%2Flibmemcached diff --git a/tests/libmemcached-1.0/sasl.cc b/tests/libmemcached-1.0/sasl.cc index 0ae101f2..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,7 +100,7 @@ collection_st collection[] ={ #include "tests/libmemcached_world.h" -void get_world(Framework *world) +void get_world(libtest::Framework* world) { world->collections(collection);