Home | History | Annotate | Download | only in intltest

Lines Matching refs:doAssert

49 CollationAPITest::doAssert(UBool condition, const char *message)
130 doAssert((col->compare("ab", "abc") == Collator::LESS), "ab < abc comparison failed");
131 doAssert((col->compare("ab", "AB") == Collator::LESS), "ab < AB comparison failed");
132 doAssert((col->compare("blackbird", "black-bird") == Collator::GREATER), "black-bird > blackbird comparison failed");
133 doAssert((col->compare("black bird", "black-bird") == Collator::LESS), "black bird > black-bird comparison failed");
134 doAssert((col->compare("Hello", "hello") == Collator::GREATER), "Hello > hello comparison failed");
136 doAssert((col->compareUTF8("\x61\x62\xc3\xa4", "\x61\x62\xc3\x9f", success) == UCOL_LESS), "ab a-umlaut < ab sharp-s UTF-8 comparison failed");
144 doAssert((col->compare(abauIter, abssIter, success) == UCOL_LESS), "ab a-umlaut < ab sharp-s UCharIterator comparison failed");
149 doAssert((col->compare("ab", "abc", 2) == Collator::EQUAL), "ab = abc with length 2 comparison failed");
150 doAssert((col->compare("ab", "AB", 2) == Collator::LESS), "ab < AB with length 2 comparison failed");
151 doAssert((col->compare("ab", "Aa", 1) == Collator::LESS), "ab < Aa with length 1 comparison failed");
152 doAssert((col->compare("ab", "Aa", 2) == Collator::GREATER), "ab > Aa with length 2 comparison failed");
153 doAssert((col->compare("black-bird", "blackbird", 5) == Collator::EQUAL), "black-bird = blackbird with length of 5 comparison failed");
154 doAssert((col->compare("black bird", "black-bird", 10) == Collator::LESS), "black bird < black-bird with length 10 comparison failed");
155 doAssert((col->compare("Hello", "hello", 5) == Collator::GREATER), "Hello > hello with length 5 comparison failed");
161 doAssert((col->getStrength() == Collator::TERTIARY), "collation object has the wrong strength");
162 doAssert((col->getStrength() != Collator::PRIMARY), "collation object's strength is primary difference");
167 doAssert((col->getStrength() != Collator::TERTIARY), "collation object's strength is secondary difference");
168 doAssert((col->getStrength() != Collator::PRIMARY), "collation object's strength is primary difference");
169 doAssert((col->getStrength() == Collator::SECONDARY), "collation object has the wrong strength");
175 doAssert((name == UnicodeString("Englisch (Vereinigte Staaten)")), "getDisplayName failed");
179 doAssert((name == UnicodeString("English (United States)")), "getDisplayName failed");
185 doAssert((name == UnicodeString("English (United States)")), "getDisplayName failed if this is an English machine");
190 doAssert(rcol->getRules().length() != 0, "da_DK rules does not have length 0");
202 doAssert((col->getStrength() != Collator::TERTIARY), "collation object has the wrong strength");
203 doAssert((col->getStrength() == Collator::PRIMARY), "collation object's strength is not primary difference");
207 doAssert((col->getStrength() == Collator::TERTIARY), "collation object's strength is not tertiary difference");
208 doAssert((col->getStrength() != Collator::PRIMARY), "collation object's strength is primary difference");
209 doAssert((col->getStrength() != Collator::SECONDARY), "collation object's strength is secondary difference");
233 doAssert(((RuleBasedCollator *)col)->getRules() == ((RuleBasedCollator *)junk)->getRules(),
247 doAssert((*frCol != *junk), "The junk is the same as the French collator.");
250 doAssert((*frCol == *aFrCol), "The cloning of a French collator failed.");
332 doAssert(rule1 != rule2, "Default collator getRules failed");
333 doAssert(rule2 != rule3, "Default collator getRules failed");
334 doAssert(rule1 != rule3, "Default collator getRules failed");
343 doAssert(rule2 == rule4, "Default collator getRules failed");
459 doAssert(col->greater(test1, test2), "Result should be \"abCda\" >>> \"abcda\" ");
460 doAssert(someCollators[index]->equals(test1, test2), "Result should be \"abcda\" == \"abCda\"");
498 doAssert(col1->hashCode() != col2->hashCode(), "Hash test1 result incorrect" );
499 doAssert(!(col1->hashCode() == col2->hashCode()), "Hash test2 result incorrect" );
500 doAssert(col1->hashCode() == col3->hashCode(), "Hash result not equal" );
516 doAssert(sortk1.hashCode() != sortk2.hashCode(), "Hash test1 result incorrect");
517 doAssert(sortk2.hashCode() == sortk3.hashCode(), "Hash result not equal" );
548 doAssert(sortk1.isBogus() == FALSE && length == 0,
553 doAssert(sortk1.getByteArray(length) == NULL && length == 0,
560 doAssert((sortk1.compareTo(col->getCollationKey(test2, sortk2, key2Status)))
568 doAssert((sortk1 != sortk2), "The sort keys should be different");
569 doAssert((sortk1.hashCode() != sortk2.hashCode()), "sort key hashCode() failed");
570 doAssert((sortk2 == sortk3), "The sort keys should be the same");
571 doAssert((sortk1 == sortkNew), "The sort keys assignment failed");
572 doAssert((sortk1.hashCode() == sortkNew.hashCode()), "sort key hashCode() failed");
573 doAssert((sortkNew != sortk3), "The sort keys should be different");
574 doAssert(sortk1.compareTo(sortk3) == Collator::GREATER, "Result should be \"Abcda\" >>> \"abcda\"");
575 doAssert(sortk2.compareTo(sortk3) == Collator::EQUAL, "Result should be \"abcda\" == \"abcda\"");
576 doAssert(sortkEmpty.compareTo(sortk1) == Collator::LESS, "Result should be (empty key) <<< \"Abcda\"");
577 doAssert(sortk1.compareTo(sortkEmpty) == Collator::GREATER, "Result should be \"Abcda\" >>> (empty key)");
578 doAssert(sortkEmpty.compareTo(sortkEmpty) == Collator::EQUAL, "Result should be (empty key) == (empty key)");
579 doAssert(sortk1.compareTo(sortk3, success) == UCOL_GREATER, "Result should be \"Abcda\" >>> \"abcda\"");
580 doAssert(sortk2.compareTo(sortk3, success) == UCOL_EQUAL, "Result should be \"abcda\" == \"abcda\"");
581 doAssert(sortkEmpty.compareTo(sortk1, success) == UCOL_LESS, "Result should be (empty key) <<< \"Abcda\"");
582 doAssert(sortk1.compareTo(sortkEmpty, success) == UCOL_GREATER, "Result should be \"Abcda\" >>> (empty key)");
583 doAssert(sortkEmpty.compareTo(sortkEmpty, success) == UCOL_EQUAL, "Result should be (empty key) == (empty key)");
610 doAssert(memcmp(byteArray2, sortk2_compat, strlen(sortk2_compat)) == 0,
613 doAssert(sortk1.compareTo(sortk4) == Collator::EQUAL, "CollationKey::toByteArray(sortk1) Failed.");
614 doAssert(sortk2.compareTo(sortk5) == Collator::EQUAL, "CollationKey::toByteArray(sortk2) Failed.");
615 doAssert(sortk4.compareTo(sortk5) == Collator::GREATER, "sortk4 >>> sortk5 Failed");
616 doAssert(sortk1.compareTo(sortk6) == Collator::EQUAL, "CollationKey::getByteArray(sortk1) Failed.");
617 doAssert(sortk2.compareTo(sortk7) == Collator::EQUAL, "CollationKey::getByteArray(sortk2) Failed.");
618 doAssert(sortk6.compareTo(sortk7) == Collator::GREATER, "sortk6 >>> sortk7 Failed");
621 doAssert(sortk1 == sortk4, "sortk1 == sortk4 Failed.");
622 doAssert(sortk2 == sortk5, "sortk2 == sortk5 Failed.");
623 doAssert(sortk1 != sortk5, "sortk1 != sortk5 Failed.");
624 doAssert(sortk1 == sortk6, "sortk1 == sortk6 Failed.");
625 doAssert(sortk2 == sortk7, "sortk2 == sortk7 Failed.");
626 doAssert(sortk1 != sortk7, "sortk1 != sortk7 Failed.");
632 doAssert(sortk1 == sortk3, "sortk1 = sortk3 assignment Failed.");
633 doAssert(sortk2 != sortk3, "sortk2 != sortk3 Failed.");
637 doAssert(col->getCollationKey(test1, sortk1, key1Status).compareTo(
685 doAssert((*iterator1 == *iterator2), "The two iterators should be the same");
686 doAssert((*iterator1 != *iterator3), "The two iterators should be different");
688 doAssert((*coliter == *iterator1), "The two iterators should be the same");
689 doAssert((*coliter == *iterator2), "The two iterators should be the same");
690 doAssert((*coliter != *iterator3), "The two iterators should be different");
699 doAssert((*iterator1 != *iterator2), "The first iterator advance failed");
701 doAssert((order1 != order2), "The order result should not be the same");
709 doAssert((*iterator1 == *iterator2), "The second iterator advance failed");
710 doAssert((order1 == order2), "The order result should be the same");
718 doAssert((CollationElementIterator::primaryOrder(order1) ==
720 doAssert((CollationElementIterator::secondaryOrder(order1) ==
722 doAssert((CollationElementIterator::tertiaryOrder(order1) ==
732 doAssert((CollationElementIterator::primaryOrder(order1) ==
734 doAssert((CollationElementIterator::tertiaryOrder(order1) !=
741 doAssert((CollationElementIterator::secondaryOrder(order1) !=
744 doAssert((order1 != CollationElementIterator::NULLORDER), "Unexpected end of iterator reached");
754 doAssert((*iterator1 != *iterator2), "The first iterator advance failed");
763 doAssert((*iterator1 == *iterator2), "The second iterator advance failed");
764 doAssert((order1 == order2), "The order result should be the same");
773 doAssert((CollationElementIterator::primaryOrder(order1) ==
775 doAssert((CollationElementIterator::secondaryOrder(order1) ==
777 doAssert((CollationElementIterator::tertiaryOrder(order1) ==
787 doAssert((CollationElementIterator::primaryOrder(order1) ==
789 doAssert((CollationElementIterator::tertiaryOrder(order1) !=
801 doAssert((CollationElementIterator::secondaryOrder(order1) !=
804 doAssert((order1 != CollationElementIterator::NULLORDER), "Unexpected end of iterator reached");
805 doAssert((*iterator2 != *iterator3), "The iterators should be different");
861 doAssert((*col1 != *col2), "The two different table collations compared equal");
863 doAssert((*col1 == *col2), "Collator objects not equal after assignment (operator=)");
871 doAssert((*col1 != *col3), "The two different table collations compared equal");
874 doAssert((*col1 == *col4), "Cloned collation objects not equal");
875 doAssert((*col3 != *col4), "Two different table collations compared equal");
876 doAssert((*col3 == *col5), "Cloned collation objects not equal");
877 doAssert((*col4 != *col5), "Two cloned collations compared equal");
885 doAssert((((RuleBasedCollator*)col3)->getRules() == col6->getRules()), "Default collator getRules failed");
905 // doAssert((*col7 == *col8), "The two equal table collations compared different");
906 doAssert((*col7 != *col9), "The two different table collations compared equal");
907 doAssert((*col8 != *col9), "The two different table collations compared equal");
932 doAssert((*col1 == *col2), "Cloned object is not equal to the orginal");
935 doAssert((*col1 != *col3), "Cloned object is equal to some dummy");
937 doAssert((*col1 == *col3), "Copied object is not equal to the orginal");
988 doAssert((!col->equals(test1, test2) ), "Result should be \"Abcda\" != \"abcda\"");
989 doAssert((col->greater(test1, test2) ), "Result should be \"Abcda\" >>> \"abcda\"");
990 doAssert((col->greaterOrEqual(test1, test2) ), "Result should be \"Abcda\" >>> \"abcda\"");
995 doAssert((col->equals(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
996 doAssert((!col->greater(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
997 doAssert((col->greaterOrEqual(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
1002 doAssert((col->equals(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
1003 doAssert((!col->greater(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
1004 doAssert((col->greaterOrEqual(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
1012 doAssert((col->compare(test1, test2) == Collator::EQUAL), "Problem");
1013 doAssert((col->compare(test1, test2, success) == UCOL_EQUAL), "Problem");
1014 doAssert((col->compare(t1, t1Len, t2, t2Len) == Collator::EQUAL), "Problem");
1015 doAssert((col->compare(t1, t1Len, t2, t2Len, success) == UCOL_EQUAL), "Problem");
1016 doAssert((col->compare(test1, test2, t1Len) == Collator::EQUAL), "Problem");
1017 doAssert((col->compare(test1, test2, t1Len, success) == UCOL_EQUAL), "Problem");
1020 doAssert((col->compare(test1, test2) == Collator::GREATER), "Problem");
1021 doAssert((col->compare(test1, test2, success) == UCOL_GREATER), "Problem");
1022 doAssert((col->compare(t1, t1Len, t2, t2Len) == Collator::GREATER), "Problem");
1023 doAssert((col->compare(t1, t1Len, t2, t2Len, success) == UCOL_GREATER), "Problem");
1024 doAssert((col->compare(test1, test2, t1Len) == Collator::GREATER), "Problem");
1025 doAssert((col->compare(test1, test2, t1Len, success) == UCOL_GREATER), "Problem");
1182 doAssert(key1.compareTo(key2) == Collator::GREATER,
1184 doAssert(key2.compareTo(key1) == Collator::LESS,
1186 doAssert(key2.compareTo(key3) == Collator::EQUAL,
1190 doAssert(strcmp((const char *)(key2.getByteArray(keylength)),
1199 doAssert(memcmp(tempkey, sortkey1, keylength) == 0,
1202 doAssert(memcmp(tempkey, sortkey2, keylength) == 0,
1205 doAssert(memcmp(tempkey, sortkey3, keylength) == 0,
1213 doAssert(memcmp(tempkey, sortkey1, keylength) == 0,
1216 doAssert(memcmp(tempkey, sortkey2, keylength) == 0,
1219 doAssert(memcmp(tempkey, sortkey3, keylength) == 0,
1230 doAssert(memcmp(tempkey, sortkey1, keylength) == 0,
1233 doAssert(memcmp(tempkey, sortkey2, keylength) == 0,
1236 doAssert(memcmp(tempkey, sortkey3, keylength) == 0,
1246 doAssert(key1.compareTo(key2) == Collator::EQUAL,
1248 doAssert(key2.compareTo(key3) == Collator::EQUAL,
1252 doAssert(memcmp(tempkey, key2compat, keylength - 1) == 0,
1260 doAssert(memcmp(tempkey, sortkey1, keylength) == 0,
1263 doAssert(memcmp(tempkey, sortkey2, keylength) == 0,
1266 doAssert(memcmp(tempkey, sortkey3, keylength) == 0,
1274 doAssert(memcmp(tempkey, sortkey1, keylength) == 0,
1277 doAssert(memcmp(tempkey, sortkey2, keylength) == 0,
1280 doAssert(memcmp(tempkey, sortkey3, keylength) == 0,
1288 doAssert(memcmp(tempkey, sortkey1, keylength) == 0,
1291 doAssert(memcmp(tempkey, sortkey2, keylength) == 0,
1294 doAssert(memcmp(tempkey, sortkey3, keylength) == 0,
2185 doAssert(col1 != col2, "2 instance of TestCollator should be different");