test_literal_param("foo"),
test_literal_param("when we sanitize"),
time_t(0), (uint32_t)0);
- test_true_got(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED, memcached_last_error_message(memc));
+ test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED);
return TEST_SUCCESS;
}
size_t string_length;
char *string= memcached_get(memc_clone, key, strlen(key),
&string_length, &flags, &rc);
- test_compare_got(MEMCACHED_NOTFOUND, rc, memcached_strerror(NULL, rc));
+ test_compare(MEMCACHED_NOTFOUND, rc);
test_zero(string_length);
test_false(string);
}
while ((results= memcached_fetch_result(memc, &results_obj, &rc))) { test_true(false); /* We should never see a value returned */ };
test_false(results);
- test_compare_got(MEMCACHED_NOTFOUND, rc, memcached_strerror(NULL, rc));
+ test_compare(MEMCACHED_NOTFOUND, rc);
for (uint32_t x= 0; x < 3; x++)
{
rc= memcached_set(memc, keys[x], key_length[x],
keys[x], key_length[x],
(time_t)50, (uint32_t)9);
- test_true_got(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED, memcached_strerror(NULL, rc));
+ test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED);
}
test_compare(MEMCACHED_SUCCESS,
test_true(results);
}
test_false(results);
- test_compare_got(MEMCACHED_NOTFOUND, rc, memcached_strerror(NULL, rc));
+ test_compare(MEMCACHED_NOTFOUND, rc);
for (uint32_t x= 0; x < 3; x++)
{
rc= memcached_set(memc, keys[x], key_length[x],
keys[x], key_length[x],
(time_t)50, (uint32_t)9);
- test_true_got(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED, memcached_strerror(NULL, rc));
+ test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED);
}
test_compare(MEMCACHED_SUCCESS,
rc= memcached_set(memc, keys[x], key_length[x],
keys[x], key_length[x],
(time_t)50, (uint32_t)9);
- test_true_got(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED, memcached_strerror(NULL, rc));
+ test_true(rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED);
}
test_compare(MEMCACHED_SUCCESS,
memcached_mget(memc, keys, key_length, 3));
memcached_result_st *result= memcached_fetch_result(memc, NULL, &rc);
test_null(result);
- test_compare_got(MEMCACHED_NOTFOUND, rc, memcached_strerror(NULL, rc));
+ test_compare(MEMCACHED_NOTFOUND, rc);
memcached_result_free(result);
count++;
}
test_zero(count);
- test_compare_got(MEMCACHED_NOTFOUND, rc, memcached_strerror(NULL, rc));
+ test_compare(MEMCACHED_NOTFOUND, rc);
for (uint32_t x= 0; x < test_array_length(keys); x++)
{
&value[0], value.size(),
0, 0);
- test_true_got((rc == MEMCACHED_SUCCESS or rc == MEMCACHED_WRITE_FAILURE or rc == MEMCACHED_BUFFERED or rc == MEMCACHED_TIMEOUT or rc == MEMCACHED_CONNECTION_FAILURE
- or rc == MEMCACHED_SERVER_TEMPORARILY_DISABLED),
- memcached_strerror(NULL, rc));
+ test_true((rc == MEMCACHED_SUCCESS or rc == MEMCACHED_WRITE_FAILURE or rc == MEMCACHED_BUFFERED or rc == MEMCACHED_TIMEOUT or rc == MEMCACHED_CONNECTION_FAILURE
+ or rc == MEMCACHED_SERVER_TEMPORARILY_DISABLED));
if (rc == MEMCACHED_WRITE_FAILURE or rc == MEMCACHED_TIMEOUT)
{
test_compare(string_length, current_length);
char buffer[1024];
snprintf(buffer, sizeof(buffer), "%u", uint32_t(string_length));
- test_memcmp_hint(string, &value[0], string_length, buffer);
+ test_memcmp(string, &value[0], string_length);
free(string);
}
/* Check the return sizes on FLAGS to make sure it stores 32bit unsigned values correctly */
test_return_t user_supplied_bug16(memcached_st *memc)
{
- test_compare_hint(MEMCACHED_SUCCESS, memcached_set(memc, test_literal_param("mykey"),
- NULL, 0,
- (time_t)0, UINT32_MAX),
- memcached_last_error_message(memc));
+ test_compare(MEMCACHED_SUCCESS, memcached_set(memc, test_literal_param("mykey"),
+ NULL, 0,
+ (time_t)0, UINT32_MAX));
size_t length;
test_return_t util_version_test(memcached_st *memc)
{
- test_compare_hint(MEMCACHED_SUCCESS, memcached_version(memc), memcached_last_error_message(memc));
+ test_compare(MEMCACHED_SUCCESS, memcached_version(memc));
test_true(libmemcached_util_version_check(memc, 0, 0, 0));
bool if_successful= libmemcached_util_version_check(memc, 9, 9, 9);