*
*/
-#include <config.h>
+#include <mem_config.h>
#include <cstdlib>
#include <climits>
{
uint64_t* counter= (uint64_t*)context;
unsigned long number_value= strtoul(value, (char **)NULL, 10);
- if (number_value == ULONG_MAX)
- {
- return MEMCACHED_FAILURE;
- }
+ ASSERT_NEQ(number_value, ULONG_MAX);
*counter= *counter +number_value;
}
for (uint32_t x= 0; x < memcached_dump_TEST2_COUNT; x++)
{
char key[1024];
-
int length= snprintf(key, sizeof(key), "%s%u", __func__, x);
- test_true(length > 0);
+ ASSERT_TRUE(length > 0);
test_compare(MEMCACHED_SUCCESS,
memcached_set(memc, key, length,
memcached_quit(memc);
uint64_t counter= 0;
- test_compare(MEMCACHED_SUCCESS,
- memcached_stat_execute(memc, NULL, item_counter, &counter));
- test_true(counter);
+ ASSERT_EQ(MEMCACHED_SUCCESS,
+ memcached_stat_execute(memc, NULL, item_counter, &counter));
+ ASSERT_TRUE(counter);
return TEST_SUCCESS;
}