X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=tests%2Flibmemcached_world.h;h=aab09ea3e5ed0cfcfd6d27503bc3ecfb5b3bcf16;hb=55b5455291498ef63c1c34976552d58708a74732;hp=4092d95104773c9930c151e4d4b4c34cb31db952;hpb=46b28da059e5f3a0f7260a5df2c1cf98602b017b;p=awesomized%2Flibmemcached diff --git a/tests/libmemcached_world.h b/tests/libmemcached_world.h index 4092d951..aab09ea3 100644 --- a/tests/libmemcached_world.h +++ b/tests/libmemcached_world.h @@ -96,12 +96,13 @@ test_return_t world_flush(libmemcached_test_container_st *container) test_return_t world_pre_run(libmemcached_test_container_st *container) { - uint32_t loop; - - for (loop= 0; loop < memcached_server_list_count(container->construct.servers); loop++) + for (uint32_t loop= 0; loop < memcached_server_list_count(container->construct.servers); loop++) { - test_truth(container->memc->hosts[loop].fd == -1); - test_truth(container->memc->hosts[loop].cursor_active == 0); + memcached_server_st *instance= + memcached_server_instance_fetch(container->memc, loop); + + test_truth(instance->fd == -1); + test_truth(instance->cursor_active == 0); } return TEST_SUCCESS; @@ -110,7 +111,7 @@ test_return_t world_pre_run(libmemcached_test_container_st *container) test_return_t world_post_run(libmemcached_test_container_st *container) { - assert(container->memc); + test_truth(container->memc); return TEST_SUCCESS; }