+
+ /* 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.setValueComparator(uhash_compareLong);
+ TEST_ASSERT((!a->equals(b)));
+ a->setValueComparator(uhash_compareLong);
+ TEST_ASSERT((a->equals(b)));
+ TEST_ASSERT((a->equals(*a))); // This better be reflexive.
+
+ /* verify that setKeyComparator works */
+ TEST_ASSERT((a->puti("a", 1, status) == 0));
+ TEST_ASSERT((a->find("a") != NULL));
+ a->setKeyComparator(neverTRUE);
+ TEST_ASSERT((a->find("a") == NULL));
+