X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/46f4442e9a5a4f3b98b7c1083586332f6a8a99a4..d25163bfc042dbef00577180ee21dd3460fc3715:/icuSources/test/intltest/uvectest.cpp diff --git a/icuSources/test/intltest/uvectest.cpp b/icuSources/test/intltest/uvectest.cpp index 434876f9..43841e95 100644 --- a/icuSources/test/intltest/uvectest.cpp +++ b/icuSources/test/intltest/uvectest.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2004-2006, International Business Machines Corporation and + * Copyright (c) 2004-2011, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -9,10 +9,10 @@ #include "intltest.h" #include "uvectest.h" -#include "uvector.h" -#include "hash.h" - #include "cstring.h" +#include "hash.h" +#include "uelement.h" +#include "uvector.h" //--------------------------------------------------------------------------- // @@ -66,8 +66,8 @@ void UVectorTest::runIndexedTest( int32_t index, UBool exec, const char* &name, errln("UVectorTest failure at line %d.\n", __LINE__);\ } -static int8_t -UVectorTest_compareInt32(UHashTok key1, UHashTok key2) { +static int8_t U_CALLCONV +UVectorTest_compareInt32(UElement key1, UElement key2) { if (key1.integer > key2.integer) { return 1; } @@ -79,7 +79,7 @@ UVectorTest_compareInt32(UHashTok key1, UHashTok key2) { U_CDECL_BEGIN static int8_t U_CALLCONV -UVectorTest_compareCstrings(const UHashTok key1, const UHashTok key2) { +UVectorTest_compareCstrings(const UElement key1, const UElement key2) { return !strcmp((const char *)key1.pointer, (const char *)key2.pointer); } U_CDECL_END @@ -161,7 +161,7 @@ void UVectorTest::UStack_API() { } U_CDECL_BEGIN -static UBool U_CALLCONV neverTRUE(const UHashTok /*key1*/, const UHashTok /*key2*/) { +static UBool U_CALLCONV neverTRUE(const UElement /*key1*/, const UElement /*key2*/) { return FALSE; } @@ -178,21 +178,21 @@ void UVectorTest::Hashtable_API() { TEST_ASSERT((a->removei("a") == 1)); TEST_ASSERT((a->find("a") == NULL)); - /* verify that setValueCompartor works */ + /* verify that setValueComparator works */ Hashtable b(status); TEST_ASSERT((!a->equals(b))); TEST_ASSERT((b.puti("b", 2, status) == 0)); TEST_ASSERT((!a->equals(b))); // Without a value comparator, this will be FALSE by default. - b.setValueCompartor(uhash_compareLong); + b.setValueComparator(uhash_compareLong); TEST_ASSERT((!a->equals(b))); - a->setValueCompartor(uhash_compareLong); + a->setValueComparator(uhash_compareLong); TEST_ASSERT((a->equals(b))); TEST_ASSERT((a->equals(*a))); // This better be reflexive. - /* verify that setKeyCompartor works */ + /* verify that setKeyComparator works */ TEST_ASSERT((a->puti("a", 1, status) == 0)); TEST_ASSERT((a->find("a") != NULL)); - a->setKeyCompartor(neverTRUE); + a->setKeyComparator(neverTRUE); TEST_ASSERT((a->find("a") == NULL)); delete a;