Home | History | Annotate | Download | only in intltest

Lines Matching defs:doAssert

52 CollationAPITest::doAssert(UBool condition, const char *message)
138 doAssert((col->compare("ab", "abc") == Collator::LESS), "ab < abc comparison failed");
139 doAssert((col->compare("ab", "AB") == Collator::LESS), "ab < AB comparison failed");
140 doAssert((col->compare("blackbird", "black-bird") == Collator::GREATER), "black-bird > blackbird comparison failed");
141 doAssert((col->compare("black bird", "black-bird") == Collator::LESS), "black bird > black-bird comparison failed");
142 doAssert((col->compare("Hello", "hello") == Collator::GREATER), "Hello > hello comparison failed");
143 doAssert((col->compare("","",success) == UCOL_EQUAL), "Comparison between empty strings failed");
145 doAssert((col->compareUTF8("\x61\x62\xc3\xa4", "\x61\x62\xc3\x9f", success) == UCOL_LESS), "ab a-umlaut < ab sharp-s UTF-8 comparison failed");
153 doAssert((col->compare(abauIter, abssIter, success) == UCOL_LESS), "ab a-umlaut < ab sharp-s UCharIterator comparison failed");
158 doAssert((col->compare("ab", "abc", 2) == Collator::EQUAL), "ab = abc with length 2 comparison failed");
159 doAssert((col->compare("ab", "AB", 2) == Collator::LESS), "ab < AB with length 2 comparison failed");
160 doAssert((col->compare("ab", "Aa", 1) == Collator::LESS), "ab < Aa with length 1 comparison failed");
161 doAssert((col->compare("ab", "Aa", 2) == Collator::GREATER), "ab > Aa with length 2 comparison failed");
162 doAssert((col->compare("black-bird", "blackbird", 5) == Collator::EQUAL), "black-bird = blackbird with length of 5 comparison failed");
163 doAssert((col->compare("black bird", "black-bird", 10) == Collator::LESS), "black bird < black-bird with length 10 comparison failed");
164 doAssert((col->compare("Hello", "hello", 5) == Collator::GREATER), "Hello > hello with length 5 comparison failed");
170 doAssert((col->getStrength() == Collator::TERTIARY), "collation object has the wrong strength");
171 doAssert((col->getStrength() != Collator::PRIMARY), "collation object's strength is primary difference");
176 doAssert((col->getStrength() != Collator::TERTIARY), "collation object's strength is secondary difference");
177 doAssert((col->getStrength() != Collator::PRIMARY), "collation object's strength is primary difference");
178 doAssert((col->getStrength() == Collator::SECONDARY), "collation object has the wrong strength");
184 doAssert((name == UnicodeString("Englisch (Vereinigte Staaten)")), "getDisplayName failed");
188 doAssert((name == UnicodeString("English (United States)")), "getDisplayName failed");
194 doAssert((name == UnicodeString("English (United States)")), "getDisplayName failed if this is an English machine");
204 doAssert(rcol->getRules().length() != 0, "da_DK rules does not have length 0");
218 doAssert((col->getStrength() != Collator::TERTIARY), "collation object has the wrong strength");
219 doAssert((col->getStrength() == Collator::PRIMARY), "collation object's strength is not primary difference");
223 doAssert((col->getStrength() == Collator::TERTIARY), "collation object's strength is not tertiary difference");
224 doAssert((col->getStrength() != Collator::PRIMARY), "collation object's strength is primary difference");
225 doAssert((col->getStrength() != Collator::SECONDARY), "collation object's strength is secondary difference");
249 doAssert(((RuleBasedCollator *)col)->getRules() == ((RuleBasedCollator *)junk)->getRules(),
263 doAssert((*frCol != *junk), "The junk is the same as the fr_CA collator.");
266 doAssert((*frCol == *aFrCol), "The cloning of a fr_CA collator failed.");
348 doAssert(rule1 != rule2, "Default collator getRules failed");
349 doAssert(rule2 != rule3, "Default collator getRules failed");
350 doAssert(rule1 != rule3, "Default collator getRules failed");
359 doAssert(rule2 == rule4, "Default collator getRules failed");
475 doAssert(col->greater(test1, test2), "Result should be \"abCda\" >>> \"abcda\" ");
476 doAssert(someCollators[index]->equals(test1, test2), "Result should be \"abcda\" == \"abCda\"");
514 doAssert(col1->hashCode() != col2->hashCode(), "Hash test1 result incorrect" );
515 doAssert(!(col1->hashCode() == col2->hashCode()), "Hash test2 result incorrect" );
516 doAssert(col1->hashCode() == col3->hashCode(), "Hash result not equal" );
532 doAssert(sortk1.hashCode() != sortk2.hashCode(), "Hash test1 result incorrect");
533 doAssert(sortk2.hashCode() == sortk3.hashCode(), "Hash result not equal" );
564 doAssert(sortk1.isBogus() == FALSE && length == 0,
569 doAssert(sortk1.isBogus() && (sortk1.getByteArray(length), length) == 0,
576 doAssert((sortk1.compareTo(col->getCollationKey(test2, sortk2, key2Status)))
584 doAssert((sortk1 != sortk2), "The sort keys should be different");
585 doAssert((sortk1.hashCode() != sortk2.hashCode()), "sort key hashCode() failed");
586 doAssert((sortk2 == sortk3), "The sort keys should be the same");
587 doAssert((sortk1 == sortkNew), "The sort keys assignment failed");
588 doAssert((sortk1.hashCode() == sortkNew.hashCode()), "sort key hashCode() failed");
589 doAssert((sortkNew != sortk3), "The sort keys should be different");
590 doAssert(sortk1.compareTo(sortk3) == Collator::GREATER, "Result should be \"Abcda\" >>> \"abcda\"");
591 doAssert(sortk2.compareTo(sortk3) == Collator::EQUAL, "Result should be \"abcda\" == \"abcda\"");
592 doAssert(sortkEmpty.compareTo(sortk1) == Collator::LESS, "Result should be (empty key) <<< \"Abcda\"");
593 doAssert(sortk1.compareTo(sortkEmpty) == Collator::GREATER, "Result should be \"Abcda\" >>> (empty key)");
594 doAssert(sortkEmpty.compareTo(sortkEmpty) == Collator::EQUAL, "Result should be (empty key) == (empty key)");
595 doAssert(sortk1.compareTo(sortk3, success) == UCOL_GREATER, "Result should be \"Abcda\" >>> \"abcda\"");
596 doAssert(sortk2.compareTo(sortk3, success) == UCOL_EQUAL, "Result should be \"abcda\" == \"abcda\"");
597 doAssert(sortkEmpty.compareTo(sortk1, success) == UCOL_LESS, "Result should be (empty key) <<< \"Abcda\"");
598 doAssert(sortk1.compareTo(sortkEmpty, success) == UCOL_GREATER, "Result should be \"Abcda\" >>> (empty key)");
599 doAssert(sortkEmpty.compareTo(sortkEmpty, success) == UCOL_EQUAL, "Result should be (empty key) == (empty key)");
615 doAssert(sortk1.compareTo(sortk4) == Collator::EQUAL, "CollationKey::toByteArray(sortk1) Failed.");
616 doAssert(sortk2.compareTo(sortk5) == Collator::EQUAL, "CollationKey::toByteArray(sortk2) Failed.");
617 doAssert(sortk4.compareTo(sortk5) == Collator::GREATER, "sortk4 >>> sortk5 Failed");
618 doAssert(sortk1.compareTo(sortk6) == Collator::EQUAL, "CollationKey::getByteArray(sortk1) Failed.");
619 doAssert(sortk2.compareTo(sortk7) == Collator::EQUAL, "CollationKey::getByteArray(sortk2) Failed.");
620 doAssert(sortk6.compareTo(sortk7) == Collator::GREATER, "sortk6 >>> sortk7 Failed");
623 doAssert(sortk1 == sortk4, "sortk1 == sortk4 Failed.");
624 doAssert(sortk2 == sortk5, "sortk2 == sortk5 Failed.");
625 doAssert(sortk1 != sortk5, "sortk1 != sortk5 Failed.");
626 doAssert(sortk1 == sortk6, "sortk1 == sortk6 Failed.");
627 doAssert(sortk2 == sortk7, "sortk2 == sortk7 Failed.");
628 doAssert(sortk1 != sortk7, "sortk1 != sortk7 Failed.");
634 doAssert(sortk1 == sortk3, "sortk1 = sortk3 assignment Failed.");
635 doAssert(sortk2 != sortk3, "sortk2 != sortk3 Failed.");
639 doAssert(col->getCollationKey(test1, sortk1, key1Status).compareTo(
687 doAssert((*iterator1 == *iterator2), "The two iterators should be the same");
688 doAssert((*iterator1 != *iterator3), "The two iterators should be different");
690 doAssert((*coliter == *iterator1), "The two iterators should be the same");
691 doAssert((*coliter == *iterator2), "The two iterators should be the same");
692 doAssert((*coliter != *iterator3), "The two iterators should be different");
701 doAssert((*iterator1 != *iterator2), "The first iterator advance failed");
703 doAssert((order1 != order2), "The order result should not be the same");
711 doAssert((*iterator1 == *iterator2), "The second iterator advance failed");
712 doAssert((order1 == order2), "The order result should be the same");
720 doAssert((CollationElementIterator::primaryOrder(order1) ==
722 doAssert((CollationElementIterator::secondaryOrder(order1) ==
724 doAssert((CollationElementIterator::tertiaryOrder(order1) ==
734 doAssert((CollationElementIterator::primaryOrder(order1) ==
736 doAssert((CollationElementIterator::tertiaryOrder(order1) !=
743 doAssert((CollationElementIterator::secondaryOrder(order1) !=
746 doAssert((order1 != CollationElementIterator::NULLORDER), "Unexpected end of iterator reached");
756 doAssert((*iterator1 != *iterator2), "The first iterator advance failed");
765 doAssert((*iterator1 == *iterator2), "The second iterator advance failed");
766 doAssert((order1 == order2), "The order result should be the same");
775 doAssert((CollationElementIterator::primaryOrder(order1) ==
777 doAssert((CollationElementIterator::secondaryOrder(order1) ==
779 doAssert((CollationElementIterator::tertiaryOrder(order1) ==
789 doAssert((CollationElementIterator::primaryOrder(order1) ==
791 doAssert((CollationElementIterator::tertiaryOrder(order1) !=
803 doAssert((CollationElementIterator::secondaryOrder(order1) !=
806 doAssert((order1 != CollationElementIterator::NULLORDER), "Unexpected end of iterator reached");
807 doAssert((*iterator2 != *iterator3), "The iterators should be different");
863 doAssert((*col1 != *col2), "The two different table collations compared equal");
865 doAssert((*col1 == *col2), "Collator objects not equal after assignment (operator=)");
873 doAssert((*col1 != *col3), "The two different table collations compared equal");
876 doAssert((*col1 == *col4), "Cloned collation objects not equal");
877 doAssert((*col3 != *col4), "Two different table collations compared equal");
878 doAssert((*col3 == *col5), "Cloned collation objects not equal");
879 doAssert((*col4 != *col5), "Two cloned collations compared equal");
887 doAssert((((RuleBasedCollator*)col3)->getRules() == col6->getRules()), "Default collator getRules failed");
907 // doAssert((*col7 == *col8), "The two equal table collations compared different");
908 doAssert((*col7 != *col9), "The two different table collations compared equal");
909 doAssert((*col8 != *col9), "The two different table collations compared equal");
934 doAssert((*col1 == *col2), "Cloned object is not equal to the orginal");
937 doAssert((*col1 != *col3), "Cloned object is equal to some dummy");
939 doAssert((*col1 == *col3), "Copied object is not equal to the orginal");
990 doAssert((!col->equals(test1, test2) ), "Result should be \"Abcda\" != \"abcda\"");
991 doAssert((col->greater(test1, test2) ), "Result should be \"Abcda\" >>> \"abcda\"");
992 doAssert((col->greaterOrEqual(test1, test2) ), "Result should be \"Abcda\" >>> \"abcda\"");
997 doAssert((col->equals(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
998 doAssert((!col->greater(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
999 doAssert((col->greaterOrEqual(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
1004 doAssert((col->equals(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
1005 doAssert((!col->greater(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
1006 doAssert((col->greaterOrEqual(test1, test2) ), "Result should be \"Abcda\" == \"abcda\"");
1014 doAssert((col->compare(test1, test2) == Collator::EQUAL), "Problem");
1015 doAssert((col->compare(test1, test2, success) == UCOL_EQUAL), "Problem");
1016 doAssert((col->compare(t1, t1Len, t2, t2Len) == Collator::EQUAL), "Problem");
1017 doAssert((col->compare(t1, t1Len, t2, t2Len, success) == UCOL_EQUAL), "Problem");
1018 doAssert((col->compare(test1, test2, t1Len) == Collator::EQUAL), "Problem");
1019 doAssert((col->compare(test1, test2, t1Len, success) == UCOL_EQUAL), "Problem");
1022 doAssert((col->compare(test1, test2) == Collator::GREATER), "Problem");
1023 doAssert((col->compare(test1, test2, success) == UCOL_GREATER), "Problem");
1024 doAssert((col->compare(t1, t1Len, t2, t2Len) == Collator::GREATER), "Problem");
1025 doAssert((col->compare(t1, t1Len, t2, t2Len, success) == UCOL_GREATER), "Problem");
1026 doAssert((col->compare(test1, test2, t1Len) == Collator::GREATER), "Problem");
1027 doAssert((col->compare(test1, test2, t1Len, success) == UCOL_GREATER), "Problem");
1137 doAssert(key1.compareTo(key2) == Collator::GREATER,
1139 doAssert(key2.compareTo(key1) == Collator::LESS,
1141 doAssert(key2.compareTo(key3) == Collator::EQUAL,
1155 doAssert(memcmp(tempkey, sortkey1, keylength) == 0,
1158 doAssert(memcmp(tempkey, sortkey2, keylength) == 0,
1161 doAssert(memcmp(tempkey, sortkey3, keylength) == 0,
1169 doAssert(memcmp(tempkey, sortkey1, keylength) == 0,
1172 doAssert(memcmp(tempkey, sortkey2, keylength) == 0,
1175 doAssert(memcmp(tempkey, sortkey3, keylength) == 0,
1186 doAssert(memcmp(tempkey, sortkey1, keylength) == 0,
1189 doAssert(memcmp(tempkey, sortkey2, keylength) == 0,
1192 doAssert(memcmp(tempkey, sortkey3, keylength) == 0,
1202 doAssert(key1.compareTo(key2) == Collator::EQUAL,
1204 doAssert(key2.compareTo(key3) == Collator::EQUAL,
1208 doAssert(memcmp(tempkey, key2primary.getAlias(), keylength - 1) == 0,
1216 doAssert(memcmp(tempkey, sortkey1, keylength) == 0,
1219 doAssert(memcmp(tempkey, sortkey2, keylength) == 0,
1222 doAssert(memcmp(tempkey, sortkey3, keylength) == 0,
1230 doAssert(memcmp(tempkey, sortkey1, keylength) == 0,
1233 doAssert
1236 doAssert(memcmp(tempkey, sortkey3, keylength) == 0,
1244 doAssert(memcmp(tempkey, sortkey1, keylength) == 0,
1247 doAssert(memcmp(tempkey, sortkey2, keylength) == 0,
1250 doAssert(memcmp(tempkey, sortkey3, keylength) == 0,
2163 doAssert(col1 != col2, "2 instances of TestCollator should be different");