tests/mem_functions.cc
/* Check the return sizes on FLAGS to make sure it stores 32bit unsigned values correctly */
Check the return sizes on FLAGS to make sure it stores 32bit unsigned values correctly
Check the return sizes on FLAGS to make sure it stores 32bit unsigned values correctly
static test_return_t user_supplied_bug16(memcached_st *memc)
{
  memcached_return_t rc= memcached_set(memc, test_literal_param("mykey"),
                                       NULL, 0,
                                       (time_t)0, UINT32_MAX);
  test_compare(MEMCACHED_SUCCESS, rc);
  size_t length;
  uint32_t flags;
  char *value= memcached_get(memc, test_literal_param("mykey"),
                       &length, &flags, &rc);
  test_compare(MEMCACHED_SUCCESS, rc);
  test_true(value == NULL);
  test_zero(length);
  test_compare(flags, UINT32_MAX);
  return TEST_SUCCESS;
}
static test_return_t user_supplied_bug16 ( memcached_st * memc ) { memcached_return_t rc = memcached_set ( memc , test_literal_param ( " " ) , NULL , 0 , ( time_t ) 0 , UINT32_MAX ) ; test_compare ( MEMCACHED_SUCCESS , rc ) ; size_t length ; uint32_t flags ; char * value = memcached_get ( memc , test_literal_param ( " " ) , & length , & flags , & rc ) ; test_compare ( MEMCACHED_SUCCESS , rc ) ; test_true ( value == NULL ) ; test_zero ( length ) ; test_compare ( flags , UINT32_MAX ) ; return TEST_SUCCESS ; }
Check the return sizes on FLAGS to make sure it stores 32bit unsigned values correctly
Check the return sizes on FLAGS to make sure it stores 32bit unsigned values correctly