tests/mem_functions.cc
/*
  We connect to a server which exists, but search for a key that does not exist.
*/
We connect to a server which exists, but search for a key that does not exist.
We connect to a server which exists but search for a key that does not exist .
static test_return_t memcached_get_MEMCACHED_NOTFOUND(memcached_st *memc)
{
  const char *key= "MemcachedKeyNotEXIST";
  size_t len;
  uint32_t flags;
  memcached_return rc;
  char *value= memcached_get(memc, key, strlen(key), &len, &flags, &rc);
  test_false(value);
  test_zero(len);
  test_compare(MEMCACHED_NOTFOUND, rc);
  return TEST_SUCCESS;
}
static test_return_t memcached_get_MEMCACHED_NOTFOUND ( memcached_st * memc ) { const char * key = " " ; size_t len ; uint32_t flags ; memcached_return rc ; char * value = memcached_get ( memc , key , strlen ( key ) , & len , & flags , & rc ) ; test_false ( value ) ; test_zero ( len ) ; test_compare ( MEMCACHED_NOTFOUND , rc ) ; return TEST_SUCCESS ; }
We connect to a server which exists, but search for a key that does not exist.
We connect to a server which exists but search for a key that does not exist .
// See if memcached is reachable.