- assert(memc_clone);
-
- assert(memc_clone->call_free == memc->call_free);
- assert(memc_clone->call_malloc == memc->call_malloc);
- assert(memc_clone->call_realloc == memc->call_realloc);
- assert(memc_clone->call_calloc == memc->call_calloc);
- assert(memc_clone->connect_timeout == memc->connect_timeout);
- assert(memc_clone->delete_trigger == memc->delete_trigger);
- assert(memc_clone->distribution == memc->distribution);
- assert(memc_clone->flags == memc->flags);
- assert(memc_clone->get_key_failure == memc->get_key_failure);
- assert(memc_clone->hash == memc->hash);
- assert(memc_clone->hash_continuum == memc->hash_continuum);
- assert(memc_clone->io_bytes_watermark == memc->io_bytes_watermark);
- assert(memc_clone->io_msg_watermark == memc->io_msg_watermark);
- assert(memc_clone->io_key_prefetch == memc->io_key_prefetch);
- assert(memc_clone->on_cleanup == memc->on_cleanup);
- assert(memc_clone->on_clone == memc->on_clone);
- assert(memc_clone->poll_timeout == memc->poll_timeout);
- assert(memc_clone->rcv_timeout == memc->rcv_timeout);
- assert(memc_clone->recv_size == memc->recv_size);
- assert(memc_clone->retry_timeout == memc->retry_timeout);
- assert(memc_clone->send_size == memc->send_size);
- assert(memc_clone->server_failure_limit == memc->server_failure_limit);
- assert(memc_clone->snd_timeout == memc->snd_timeout);
- assert(memc_clone->user_data == memc->user_data);
+ test_truth(memc_clone);
+
+ test_truth(memc_clone->call_free == memc->call_free);
+ test_truth(memc_clone->call_malloc == memc->call_malloc);
+ test_truth(memc_clone->call_realloc == memc->call_realloc);
+ test_truth(memc_clone->call_calloc == memc->call_calloc);
+ test_truth(memc_clone->connect_timeout == memc->connect_timeout);
+ test_truth(memc_clone->delete_trigger == memc->delete_trigger);
+ test_truth(memc_clone->distribution == memc->distribution);
+ { // Test all of the flags
+ test_truth(memc_clone->flags.no_block == memc->flags.no_block);
+ test_truth(memc_clone->flags.tcp_nodelay == memc->flags.tcp_nodelay);
+ test_truth(memc_clone->flags.reuse_memory == memc->flags.reuse_memory);
+ test_truth(memc_clone->flags.use_md5 == memc->flags.use_md5);
+ test_truth(memc_clone->flags.use_crc == memc->flags.use_crc);
+ test_truth(memc_clone->flags.use_cache_lookups == memc->flags.use_cache_lookups);
+ test_truth(memc_clone->flags.support_cas == memc->flags.support_cas);
+ test_truth(memc_clone->flags.buffer_requests == memc->flags.buffer_requests);
+ test_truth(memc_clone->flags.use_sort_hosts == memc->flags.use_sort_hosts);
+ test_truth(memc_clone->flags.verify_key == memc->flags.verify_key);
+ test_truth(memc_clone->flags.ketama_weighted == memc->flags.ketama_weighted);
+ test_truth(memc_clone->flags.binary_protocol == memc->flags.binary_protocol);
+ test_truth(memc_clone->flags.hash_with_prefix_key == memc->flags.hash_with_prefix_key);
+ test_truth(memc_clone->flags.no_reply == memc->flags.no_reply);
+ test_truth(memc_clone->flags.use_udp == memc->flags.use_udp);
+ test_truth(memc_clone->flags.auto_eject_hosts == memc->flags.auto_eject_hosts);
+ test_truth(memc_clone->flags.randomize_replica_read == memc->flags.randomize_replica_read);
+ }
+ test_truth(memc_clone->get_key_failure == memc->get_key_failure);
+ test_truth(memc_clone->hash == memc->hash);
+ test_truth(memc_clone->hash_continuum == memc->hash_continuum);
+ test_truth(memc_clone->io_bytes_watermark == memc->io_bytes_watermark);
+ test_truth(memc_clone->io_msg_watermark == memc->io_msg_watermark);
+ test_truth(memc_clone->io_key_prefetch == memc->io_key_prefetch);
+ test_truth(memc_clone->on_cleanup == memc->on_cleanup);
+ test_truth(memc_clone->on_clone == memc->on_clone);
+ test_truth(memc_clone->poll_timeout == memc->poll_timeout);
+ test_truth(memc_clone->rcv_timeout == memc->rcv_timeout);
+ test_truth(memc_clone->recv_size == memc->recv_size);
+ test_truth(memc_clone->retry_timeout == memc->retry_timeout);
+ test_truth(memc_clone->send_size == memc->send_size);
+ test_truth(memc_clone->server_failure_limit == memc->server_failure_limit);
+ test_truth(memc_clone->snd_timeout == memc->snd_timeout);
+ test_truth(memc_clone->user_data == memc->user_data);