"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "source/test/intltest/transtst.cpp" between
icu4c-67rc-src.tgz and icu4c-67_1-src.tgz

About: ICU (International Components for Unicode) is a set of C/C++ and Java libraries providing Unicode and Globalization support for software applications on a wide variety of platforms.

transtst.cpp  (icu4c-67rc-src.tgz):transtst.cpp  (icu4c-67_1-src.tgz)
skipping to change at line 1563 skipping to change at line 1563
// end // end
0 0
}; };
for (int32_t i=0; BASIC_TRANSLITERATOR_ID[i]; i++) { for (int32_t i=0; BASIC_TRANSLITERATOR_ID[i]; i++) {
UErrorCode status = U_ZERO_ERROR; UErrorCode status = U_ZERO_ERROR;
UParseError parseError; UParseError parseError;
std::unique_ptr<Transliterator> translit(Transliterator::createInstance( std::unique_ptr<Transliterator> translit(Transliterator::createInstance(
BASIC_TRANSLITERATOR_ID[i], UTRANS_FORWARD, parseError, status)); BASIC_TRANSLITERATOR_ID[i], UTRANS_FORWARD, parseError, status));
if (translit.get() == nullptr || !U_SUCCESS(status)) { if (translit.get() == nullptr || !U_SUCCESS(status)) {
dataerrln("FAIL: createInstance %s failed", BASIC_TRANSLITERATOR_ID[ i]); dataerrln("FAIL: createInstance %s failed", BASIC_TRANSLITERATOR_ID[ i]);
continue;
} }
UnicodeString data(TEST_DATA); UnicodeString data(TEST_DATA);
UnicodeString expected(EXPECTED_RESULTS[i]); UnicodeString expected(EXPECTED_RESULTS[i]);
translit->transliterate(data); translit->transliterate(data);
if (data != expected) { if (data != expected) {
dataerrln(UnicodeString("FAIL: expected translit(") + dataerrln(UnicodeString("FAIL: expected translit(") +
BASIC_TRANSLITERATOR_ID[i] + ") = '" + BASIC_TRANSLITERATOR_ID[i] + ") = '" +
EXPECTED_RESULTS[i] + "' but got '" + data); EXPECTED_RESULTS[i] + "' but got '" + data);
continue;
} }
} }
for (int32_t i=0; BASIC_TRANSLITERATOR_RULES[i]; i++) { for (int32_t i=0; BASIC_TRANSLITERATOR_RULES[i]; i++) {
UErrorCode status = U_ZERO_ERROR; UErrorCode status = U_ZERO_ERROR;
UParseError parseError; UParseError parseError;
std::unique_ptr<Transliterator> translit(Transliterator::createFromRules ( std::unique_ptr<Transliterator> translit(Transliterator::createFromRules (
"Test", "Test",
BASIC_TRANSLITERATOR_RULES[i], UTRANS_FORWARD, parseError, status)); BASIC_TRANSLITERATOR_RULES[i], UTRANS_FORWARD, parseError, status));
if (translit.get() == nullptr || !U_SUCCESS(status)) { if (translit.get() == nullptr || !U_SUCCESS(status)) {
dataerrln("FAIL: createFromRules %s failed", BASIC_TRANSLITERATOR_RU LES[i]); dataerrln("FAIL: createFromRules %s failed", BASIC_TRANSLITERATOR_RU LES[i]);
continue;
} }
} }
} }
/** /**
* Test compound RBT rules. * Test compound RBT rules.
*/ */
void TransliteratorTest::TestCompoundRBT(void) { void TransliteratorTest::TestCompoundRBT(void) {
// Careful with spacing and ';' here: Phrase this exactly // Careful with spacing and ';' here: Phrase this exactly
// as toRules() is going to return it. If toRules() changes // as toRules() is going to return it. If toRules() changes
 End of changes. 3 change blocks. 
0 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)