2000-03-28 22:08:29 +00:00
|
|
|
/*
|
|
|
|
*******************************************************************************
|
2004-05-27 02:11:08 +00:00
|
|
|
* Copyright (C) 2000-2004, International Business Machines
|
2000-03-28 22:08:29 +00:00
|
|
|
* Corporation and others. All Rights Reserved.
|
|
|
|
*******************************************************************************
|
|
|
|
* Date Name Description
|
|
|
|
* 03/22/00 aliu Creation.
|
2000-07-13 22:33:33 +00:00
|
|
|
* 07/13/00 Madhu Added more tests
|
2000-03-28 22:08:29 +00:00
|
|
|
*******************************************************************************
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "cintltst.h"
|
|
|
|
#include "uhash.h"
|
|
|
|
#include "unicode/ctest.h"
|
2000-07-13 22:33:33 +00:00
|
|
|
#include "unicode/ustring.h"
|
2000-03-28 22:08:29 +00:00
|
|
|
#include "cstring.h"
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* Prototypes
|
|
|
|
*********************************************************************/
|
|
|
|
|
2000-07-13 22:33:33 +00:00
|
|
|
static void TestBasic(void);
|
|
|
|
static void TestOtherAPI(void);
|
2004-12-21 05:03:43 +00:00
|
|
|
static void hashIChars(void);
|
2000-03-28 22:08:29 +00:00
|
|
|
|
2001-11-21 01:17:02 +00:00
|
|
|
static int32_t U_EXPORT2 U_CALLCONV hashChars(const UHashTok key);
|
2000-03-28 22:08:29 +00:00
|
|
|
|
2001-11-21 01:17:02 +00:00
|
|
|
static UBool U_EXPORT2 U_CALLCONV isEqualChars(const UHashTok key1, const UHashTok key2);
|
2000-03-28 22:08:29 +00:00
|
|
|
|
|
|
|
static void _put(UHashtable* hash,
|
|
|
|
const char* key,
|
|
|
|
int32_t value,
|
|
|
|
int32_t expectedOldValue);
|
|
|
|
|
2000-11-21 18:05:36 +00:00
|
|
|
static void _get(UHashtable* hash,
|
2000-03-28 22:08:29 +00:00
|
|
|
const char* key,
|
|
|
|
int32_t expectedValue);
|
|
|
|
|
2000-11-21 18:05:36 +00:00
|
|
|
static void _remove(UHashtable* hash,
|
2000-03-28 22:08:29 +00:00
|
|
|
const char* key,
|
|
|
|
int32_t expectedValue);
|
|
|
|
|
2001-05-31 23:42:59 +00:00
|
|
|
void addHashtableTest(TestNode** root);
|
|
|
|
|
2001-07-06 19:53:12 +00:00
|
|
|
/**********************************************************************
|
2001-10-16 18:31:13 +00:00
|
|
|
* UHashTok wrapper functions
|
2001-07-06 19:53:12 +00:00
|
|
|
*********************************************************************/
|
|
|
|
|
|
|
|
static UBool
|
|
|
|
_compareChars(void* a, void* b) {
|
2001-10-16 18:31:13 +00:00
|
|
|
UHashTok s, t;
|
2001-07-06 19:53:12 +00:00
|
|
|
s.pointer = a;
|
|
|
|
t.pointer = b;
|
|
|
|
return uhash_compareChars(s, t);
|
|
|
|
}
|
|
|
|
|
|
|
|
static UBool
|
|
|
|
_compareIChars(void* a, void* b) {
|
2001-10-16 18:31:13 +00:00
|
|
|
UHashTok s, t;
|
2001-07-06 19:53:12 +00:00
|
|
|
s.pointer = a;
|
|
|
|
t.pointer = b;
|
|
|
|
return uhash_compareIChars(s, t);
|
|
|
|
}
|
|
|
|
|
|
|
|
static UBool
|
|
|
|
_compareUChars(void* a, void* b) {
|
2001-10-16 18:31:13 +00:00
|
|
|
UHashTok s, t;
|
2001-07-06 19:53:12 +00:00
|
|
|
s.pointer = a;
|
|
|
|
t.pointer = b;
|
|
|
|
return uhash_compareUChars(s, t);
|
|
|
|
}
|
|
|
|
|
|
|
|
static UBool
|
|
|
|
_compareLong(int32_t a, int32_t b) {
|
2001-10-16 18:31:13 +00:00
|
|
|
UHashTok s, t;
|
2001-07-06 19:53:12 +00:00
|
|
|
s.integer = a;
|
|
|
|
t.integer = b;
|
|
|
|
return uhash_compareLong(s, t);
|
|
|
|
}
|
|
|
|
|
2000-03-28 22:08:29 +00:00
|
|
|
/**********************************************************************
|
|
|
|
* FW Registration
|
|
|
|
*********************************************************************/
|
|
|
|
|
|
|
|
void addHashtableTest(TestNode** root) {
|
2000-07-13 22:33:33 +00:00
|
|
|
|
|
|
|
addTest(root, &TestBasic, "tsutil/chashtst/TestBasic");
|
|
|
|
addTest(root, &TestOtherAPI, "tsutil/chashtst/TestOtherAPI");
|
2004-12-21 05:03:43 +00:00
|
|
|
addTest(root, &hashIChars, "tsutil/chashtst/hashIChars");
|
2000-07-13 22:33:33 +00:00
|
|
|
|
2000-03-28 22:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* Test Functions
|
|
|
|
*********************************************************************/
|
|
|
|
|
2000-11-21 18:05:36 +00:00
|
|
|
static void TestBasic(void) {
|
2004-12-21 05:03:43 +00:00
|
|
|
static const char one[4] = {0x6F, 0x6E, 0x65, 0}; /* "one" */
|
|
|
|
static const char one2[4] = {0x6F, 0x6E, 0x65, 0}; /* Get around compiler optimizations */
|
|
|
|
static const char two[4] = {0x74, 0x77, 0x6F, 0}; /* "two" */
|
|
|
|
static const char three[6] = {0x74, 0x68, 0x72, 0x65, 0x65, 0}; /* "three" */
|
|
|
|
static const char omega[6] = {0x6F, 0x6D, 0x65, 0x67, 0x61, 0}; /* "omega" */
|
2000-03-28 22:08:29 +00:00
|
|
|
UErrorCode status = U_ZERO_ERROR;
|
|
|
|
UHashtable *hash;
|
|
|
|
|
|
|
|
hash = uhash_open(hashChars, isEqualChars, &status);
|
|
|
|
if (U_FAILURE(status)) {
|
|
|
|
log_err("FAIL: uhash_open failed with %s and returned 0x%08x\n",
|
|
|
|
u_errorName(status), hash);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (hash == NULL) {
|
|
|
|
log_err("FAIL: uhash_open returned NULL\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
log_verbose("Ok: uhash_open returned 0x%08X\n", hash);
|
|
|
|
|
2000-08-09 22:57:52 +00:00
|
|
|
_put(hash, one, 1, 0);
|
|
|
|
_put(hash, omega, 24, 0);
|
|
|
|
_put(hash, two, 2, 0);
|
|
|
|
_put(hash, three, 3, 0);
|
|
|
|
_put(hash, one, -1, 1);
|
|
|
|
_put(hash, two, -2, 2);
|
|
|
|
_put(hash, omega, 48, 24);
|
|
|
|
_put(hash, one, 100, -1);
|
|
|
|
_get(hash, three, 3);
|
|
|
|
_remove(hash, two, -2);
|
|
|
|
_get(hash, two, 0);
|
|
|
|
_get(hash, one, 100);
|
|
|
|
_put(hash, two, 200, 0);
|
|
|
|
_get(hash, omega, 48);
|
|
|
|
_get(hash, two, 200);
|
|
|
|
|
2001-07-06 19:53:12 +00:00
|
|
|
if(_compareChars((void*)one, (void*)three) == TRUE ||
|
|
|
|
_compareChars((void*)one, (void*)one2) != TRUE ||
|
|
|
|
_compareChars((void*)one, (void*)one) != TRUE ||
|
|
|
|
_compareChars((void*)one, NULL) == TRUE ) {
|
2000-07-13 22:33:33 +00:00
|
|
|
log_err("FAIL: compareChars failed\n");
|
|
|
|
}
|
2001-07-06 19:53:12 +00:00
|
|
|
if(_compareIChars((void*)one, (void*)three) == TRUE ||
|
|
|
|
_compareIChars((void*)one, (void*)one) != TRUE ||
|
|
|
|
_compareIChars((void*)one, (void*)one2) != TRUE ||
|
|
|
|
_compareIChars((void*)one, NULL) == TRUE ) {
|
2000-07-13 22:33:33 +00:00
|
|
|
log_err("FAIL: compareIChars failed\n");
|
|
|
|
}
|
|
|
|
|
2000-03-28 22:08:29 +00:00
|
|
|
uhash_close(hash);
|
2000-07-13 22:33:33 +00:00
|
|
|
|
2000-03-28 22:08:29 +00:00
|
|
|
}
|
2000-11-21 18:05:36 +00:00
|
|
|
|
|
|
|
static void TestOtherAPI(void){
|
2000-07-13 22:33:33 +00:00
|
|
|
|
|
|
|
UErrorCode status = U_ZERO_ERROR;
|
|
|
|
UHashtable *hash;
|
2000-08-07 21:12:14 +00:00
|
|
|
|
|
|
|
/* Use the correct type when cast to void * */
|
2004-12-21 05:03:43 +00:00
|
|
|
static const UChar one[4] = {0x006F, 0x006E, 0x0065, 0}; /* L"one" */
|
|
|
|
static const UChar one2[4] = {0x006F, 0x006E, 0x0065, 0}; /* Get around compiler optimizations */
|
|
|
|
static const UChar two[4] = {0x0074, 0x0077, 0x006F, 0}; /* L"two" */
|
|
|
|
static const UChar two2[4] = {0x0074, 0x0077, 0x006F, 0}; /* L"two" */
|
|
|
|
static const UChar three[6] = {0x0074, 0x0068, 0x0072, 0x0065, 0x0065, 0}; /* L"three" */
|
|
|
|
static const UChar four[6] = {0x0066, 0x006F, 0x0075, 0x0072, 0}; /* L"four" */
|
|
|
|
static const UChar five[6] = {0x0066, 0x0069, 0x0076, 0x0065, 0}; /* L"five" */
|
|
|
|
static const UChar five2[6] = {0x0066, 0x0069, 0x0076, 0x0065, 0}; /* L"five" */
|
2000-03-28 22:08:29 +00:00
|
|
|
|
2000-07-13 22:33:33 +00:00
|
|
|
hash = uhash_open(uhash_hashUChars, uhash_compareUChars, &status);
|
|
|
|
if (U_FAILURE(status)) {
|
|
|
|
log_err("FAIL: uhash_open failed with %s and returned 0x%08x\n",
|
|
|
|
u_errorName(status), hash);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (hash == NULL) {
|
|
|
|
log_err("FAIL: uhash_open returned NULL\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
log_verbose("Ok: uhash_open returned 0x%08X\n", hash);
|
|
|
|
|
2004-05-27 02:11:08 +00:00
|
|
|
uhash_puti(hash, (void*)one, 1, &status);
|
2000-07-13 22:33:33 +00:00
|
|
|
if(uhash_count(hash) != 1){
|
|
|
|
log_err("FAIL: uhas_count() failed. Expected: 1, Got: %d\n", uhash_count(hash));
|
2004-12-21 05:03:43 +00:00
|
|
|
}
|
|
|
|
if(uhash_find(hash, (void*)two) != NULL){
|
|
|
|
log_err("FAIL: uhash_find failed\n");
|
|
|
|
}
|
2004-05-27 02:11:08 +00:00
|
|
|
uhash_puti(hash, (void*)two, 2, &status);
|
|
|
|
uhash_puti(hash, (void*)three, 3, &status);
|
|
|
|
uhash_puti(hash, (void*)four, 4, &status);
|
|
|
|
uhash_puti(hash, (void*)five, 5, &status);
|
2000-07-13 22:33:33 +00:00
|
|
|
|
|
|
|
if(uhash_count(hash) != 5){
|
|
|
|
log_err("FAIL: uhas_count() failed. Expected: 5, Got: %d\n", uhash_count(hash));
|
|
|
|
}
|
|
|
|
|
2004-05-27 02:11:08 +00:00
|
|
|
if(uhash_geti(hash, (void*)two2) != 2){
|
|
|
|
log_err("FAIL: uhash_geti failed\n");
|
2000-07-13 22:33:33 +00:00
|
|
|
}
|
|
|
|
|
2004-12-21 05:03:43 +00:00
|
|
|
if(uhash_find(hash, (void*)two2) == NULL){
|
|
|
|
log_err("FAIL: uhash_find of \"two\" failed\n");
|
|
|
|
}
|
|
|
|
|
2004-05-27 02:11:08 +00:00
|
|
|
if(uhash_removei(hash, (void*)five2) != 5){
|
2000-07-13 22:33:33 +00:00
|
|
|
log_err("FAIL: uhash_remove() failed\n");
|
|
|
|
}
|
|
|
|
if(uhash_count(hash) != 4){
|
|
|
|
log_err("FAIL: uhas_count() failed. Expected: 4, Got: %d\n", uhash_count(hash));
|
|
|
|
}
|
|
|
|
|
2000-08-09 22:57:52 +00:00
|
|
|
uhash_put(hash, (void*)one, NULL, &status);
|
2000-07-13 22:33:33 +00:00
|
|
|
if(uhash_count(hash) != 3){
|
|
|
|
log_err("FAIL: uhash_put() with value=NULL didn't remove the key value pair\n");
|
|
|
|
}
|
|
|
|
status=U_ILLEGAL_ARGUMENT_ERROR;
|
2004-05-27 02:11:08 +00:00
|
|
|
uhash_puti(hash, (void*)one, 1, &status);
|
2000-07-13 22:33:33 +00:00
|
|
|
if(uhash_count(hash) != 3){
|
2000-08-09 22:57:52 +00:00
|
|
|
log_err("FAIL: uhash_put() with value!=NULL should fail when status != U_ZERO_ERROR \n");
|
2000-07-13 22:33:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
status=U_ZERO_ERROR;
|
2004-05-27 02:11:08 +00:00
|
|
|
uhash_puti(hash, (void*)one, 1, &status);
|
2000-08-09 22:57:52 +00:00
|
|
|
if(uhash_count(hash) != 4){
|
|
|
|
log_err("FAIL: uhash_put() with value!=NULL didn't replace the key value pair\n");
|
|
|
|
}
|
|
|
|
|
2001-07-06 19:53:12 +00:00
|
|
|
if(_compareUChars((void*)one, (void*)two) == TRUE ||
|
|
|
|
_compareUChars((void*)one, (void*)one) != TRUE ||
|
|
|
|
_compareUChars((void*)one, (void*)one2) != TRUE ||
|
|
|
|
_compareUChars((void*)one, NULL) == TRUE ) {
|
2000-07-13 22:33:33 +00:00
|
|
|
log_err("FAIL: compareUChars failed\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
uhash_removeAll(hash);
|
|
|
|
if(uhash_count(hash) != 0){
|
|
|
|
log_err("FAIL: uhas_count() failed. Expected: 0, Got: %d\n", uhash_count(hash));
|
|
|
|
}
|
|
|
|
|
|
|
|
uhash_setKeyComparator(hash, uhash_compareLong);
|
|
|
|
uhash_setKeyHasher(hash, uhash_hashLong);
|
2004-05-27 02:11:08 +00:00
|
|
|
uhash_iputi(hash, 1001, 1, &status);
|
|
|
|
uhash_iputi(hash, 1002, 2, &status);
|
|
|
|
uhash_iputi(hash, 1003, 3, &status);
|
2001-07-06 19:53:12 +00:00
|
|
|
if(_compareLong(1001, 1002) == TRUE ||
|
|
|
|
_compareLong(1001, 1001) != TRUE ||
|
|
|
|
_compareLong(1001, 0) == TRUE ) {
|
2000-07-13 22:33:33 +00:00
|
|
|
log_err("FAIL: compareLong failed\n");
|
|
|
|
}
|
|
|
|
/*set the resize policy to just GROW and SHRINK*/
|
|
|
|
/*how to test this??*/
|
|
|
|
uhash_setResizePolicy(hash, U_GROW_AND_SHRINK);
|
2004-05-27 02:11:08 +00:00
|
|
|
uhash_iputi(hash, 1004, 4, &status);
|
|
|
|
uhash_iputi(hash, 1005, 5, &status);
|
|
|
|
uhash_iputi(hash, 1006, 6, &status);
|
2000-07-13 22:33:33 +00:00
|
|
|
if(uhash_count(hash) != 6){
|
|
|
|
log_err("FAIL: uhash_count() failed. Expected: 6, Got: %d\n", uhash_count(hash));
|
|
|
|
}
|
2004-05-27 02:11:08 +00:00
|
|
|
if(uhash_iremovei(hash, 1004) != 4){
|
2000-07-13 22:33:33 +00:00
|
|
|
log_err("FAIL: uhash_remove failed\n");
|
|
|
|
}
|
2004-05-27 02:11:08 +00:00
|
|
|
if(uhash_iremovei(hash, 1004) != 0){
|
2000-07-13 22:33:33 +00:00
|
|
|
log_err("FAIL: uhash_remove failed\n");
|
|
|
|
}
|
2004-12-22 07:21:56 +00:00
|
|
|
|
|
|
|
uhash_removeAll(hash);
|
|
|
|
uhash_iput(hash, 2004, (void*)one, &status);
|
|
|
|
uhash_iput(hash, 2005, (void*)two, &status);
|
|
|
|
if(uhash_count(hash) != 2){
|
|
|
|
log_err("FAIL: uhash_count() failed. Expected: 2, Got: %d\n", uhash_count(hash));
|
|
|
|
}
|
|
|
|
if(uhash_iremove(hash, 2004) != (void*)one){
|
|
|
|
log_err("FAIL: uhash_remove failed\n");
|
|
|
|
}
|
|
|
|
if(uhash_iremove(hash, 2004) != NULL){
|
|
|
|
log_err("FAIL: uhash_remove failed\n");
|
|
|
|
}
|
|
|
|
if(uhash_count(hash) != 1){
|
|
|
|
log_err("FAIL: uhash_count() failed. Expected: 1, Got: %d\n", uhash_count(hash));
|
|
|
|
}
|
|
|
|
|
2000-07-13 22:33:33 +00:00
|
|
|
uhash_close(hash);
|
|
|
|
|
|
|
|
}
|
2004-12-21 05:03:43 +00:00
|
|
|
|
|
|
|
static void hashIChars(void) {
|
|
|
|
static const char which[] = "which";
|
|
|
|
static const char WHICH2[] = "WHICH";
|
|
|
|
static const char where[] = "where";
|
|
|
|
UErrorCode status = U_ZERO_ERROR;
|
|
|
|
UHashtable *hash;
|
|
|
|
|
|
|
|
hash = uhash_open(uhash_hashIChars, uhash_compareIChars, &status);
|
|
|
|
if (U_FAILURE(status)) {
|
|
|
|
log_err("FAIL: uhash_open failed with %s and returned 0x%08x\n",
|
|
|
|
u_errorName(status), hash);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (hash == NULL) {
|
|
|
|
log_err("FAIL: uhash_open returned NULL\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
log_verbose("Ok: uhash_open returned 0x%08X\n", hash);
|
|
|
|
|
|
|
|
_put(hash, which, 1, 0);
|
|
|
|
_put(hash, WHICH2, 2, 1);
|
|
|
|
_put(hash, where, 3, 0);
|
|
|
|
if(uhash_count(hash) != 2){
|
|
|
|
log_err("FAIL: uhas_count() failed. Expected: 1, Got: %d\n", uhash_count(hash));
|
|
|
|
}
|
|
|
|
_remove(hash, which, 2);
|
|
|
|
|
|
|
|
uhash_close(hash);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-03-28 22:08:29 +00:00
|
|
|
/**********************************************************************
|
|
|
|
* uhash Callbacks
|
|
|
|
*********************************************************************/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This hash function is designed to collide a lot to test key equality
|
|
|
|
* resolution. It only uses the first char.
|
|
|
|
*/
|
2001-11-21 01:17:02 +00:00
|
|
|
static int32_t U_EXPORT2 U_CALLCONV hashChars(const UHashTok key) {
|
2001-07-06 19:53:12 +00:00
|
|
|
return *(const char*) key.pointer;
|
2000-03-28 22:08:29 +00:00
|
|
|
}
|
|
|
|
|
2001-11-21 01:17:02 +00:00
|
|
|
static UBool U_EXPORT2 U_CALLCONV isEqualChars(const UHashTok key1, const UHashTok key2) {
|
2001-07-06 19:53:12 +00:00
|
|
|
return (UBool)((key1.pointer != NULL) &&
|
|
|
|
(key2.pointer != NULL) &&
|
|
|
|
(uprv_strcmp((const char*)key1.pointer, (const char*)key2.pointer) == 0));
|
2000-03-28 22:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* Wrapper Functions
|
|
|
|
*********************************************************************/
|
|
|
|
|
2000-11-21 18:05:36 +00:00
|
|
|
static void _put(UHashtable* hash,
|
2000-03-28 22:08:29 +00:00
|
|
|
const char* key,
|
|
|
|
int32_t value,
|
|
|
|
int32_t expectedOldValue) {
|
|
|
|
UErrorCode status = U_ZERO_ERROR;
|
2004-05-27 02:11:08 +00:00
|
|
|
int32_t oldValue =
|
|
|
|
uhash_puti(hash, (void*) key, value, &status);
|
2000-03-28 22:08:29 +00:00
|
|
|
if (U_FAILURE(status)) {
|
|
|
|
log_err("FAIL: uhash_put(%s) failed with %s and returned %ld\n",
|
|
|
|
key, u_errorName(status), oldValue);
|
|
|
|
} else if (oldValue != expectedOldValue) {
|
|
|
|
log_err("FAIL: uhash_put(%s) returned old value %ld; expected %ld\n",
|
|
|
|
key, oldValue, expectedOldValue);
|
|
|
|
} else {
|
|
|
|
log_verbose("Ok: uhash_put(%s, %d) returned old value %ld\n",
|
|
|
|
key, value, oldValue);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-11-21 18:05:36 +00:00
|
|
|
static void _get(UHashtable* hash,
|
2000-03-28 22:08:29 +00:00
|
|
|
const char* key,
|
|
|
|
int32_t expectedValue) {
|
|
|
|
UErrorCode status = U_ZERO_ERROR;
|
2004-05-27 02:11:08 +00:00
|
|
|
int32_t value = uhash_geti(hash, key);
|
2000-03-28 22:08:29 +00:00
|
|
|
if (U_FAILURE(status)) {
|
|
|
|
log_err("FAIL: uhash_get(%s) failed with %s and returned %ld\n",
|
|
|
|
key, u_errorName(status), value);
|
|
|
|
} else if (value != expectedValue) {
|
|
|
|
log_err("FAIL: uhash_get(%s) returned %ld; expected %ld\n",
|
|
|
|
key, value, expectedValue);
|
|
|
|
} else {
|
|
|
|
log_verbose("Ok: uhash_get(%s) returned value %ld\n",
|
|
|
|
key, value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-11-21 18:05:36 +00:00
|
|
|
static void _remove(UHashtable* hash,
|
2000-03-28 22:08:29 +00:00
|
|
|
const char* key,
|
|
|
|
int32_t expectedValue) {
|
2004-05-27 02:11:08 +00:00
|
|
|
int32_t value = uhash_removei(hash, key);
|
2000-03-28 22:08:29 +00:00
|
|
|
if (value != expectedValue) {
|
|
|
|
log_err("FAIL: uhash_remove(%s) returned %ld; expected %ld\n",
|
|
|
|
key, value, expectedValue);
|
|
|
|
} else {
|
|
|
|
log_verbose("Ok: uhash_remove(%s) returned old value %ld\n",
|
|
|
|
key, value);
|
|
|
|
}
|
|
|
|
}
|
2004-12-21 05:03:43 +00:00
|
|
|
|