mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-18 19:25:49 +00:00
ICU-2248 modularize icu - fix tests
X-SVN-Rev: 9947
This commit is contained in:
parent
1234754799
commit
c9cf5f3592
3 changed files with 30 additions and 1 deletions
|
@ -333,6 +333,11 @@ UBool StringSearchTest::assertEqual(const SearchData *search)
|
|||
StringSearch *strsrch;
|
||||
UChar temp[128];
|
||||
|
||||
#if UCONFIG_NO_BREAK_ITERATION
|
||||
if(search->breaker) {
|
||||
return TRUE; /* skip test */
|
||||
}
|
||||
#endif
|
||||
u_unescape(search->text, temp, 128);
|
||||
UnicodeString text;
|
||||
text.setTo(temp);
|
||||
|
@ -371,6 +376,12 @@ UBool StringSearchTest::assertCanonicalEqual(const SearchData *search)
|
|||
StringSearch *strsrch;
|
||||
UChar temp[128];
|
||||
|
||||
#if UCONFIG_NO_BREAK_ITERATION
|
||||
if(search->breaker) {
|
||||
return TRUE; /* skip test */
|
||||
}
|
||||
#endif
|
||||
|
||||
u_unescape(search->text, temp, 128);
|
||||
UnicodeString text;
|
||||
text.setTo(temp);
|
||||
|
@ -412,6 +423,13 @@ UBool StringSearchTest::assertEqualWithAttribute(const SearchData *search,
|
|||
StringSearch *strsrch;
|
||||
UChar temp[128];
|
||||
|
||||
|
||||
#if UCONFIG_NO_BREAK_ITERATION
|
||||
if(search->breaker) {
|
||||
return TRUE; /* skip test */
|
||||
}
|
||||
#endif
|
||||
|
||||
u_unescape(search->text, temp, 128);
|
||||
UnicodeString text;
|
||||
text.setTo(temp);
|
||||
|
|
|
@ -235,6 +235,12 @@ void TransliteratorAPITest::TestGetDisplayName() {
|
|||
UnicodeString message;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
UParseError parseError;
|
||||
|
||||
#if UCONFIG_NO_FORMATTING
|
||||
logln("Skipping, UCONFIG_NO_FORMATTING is set\n");
|
||||
return;
|
||||
#else
|
||||
|
||||
for (uint32_t i=0; i<sizeof(dispNames)/sizeof(dispNames[0]); i=i+2 ) {
|
||||
t = Transliterator::createInstance(dispNames[i+0], UTRANS_FORWARD, parseError, status);
|
||||
if(t==0){
|
||||
|
@ -256,7 +262,7 @@ void TransliteratorAPITest::TestGetDisplayName() {
|
|||
|
||||
delete t;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -3064,6 +3064,10 @@ void TransliteratorTest::TestAnchorMasking(){
|
|||
* Make sure display names of variants look reasonable.
|
||||
*/
|
||||
void TransliteratorTest::TestDisplayName() {
|
||||
#if UCONFIG_NO_FORMATTING
|
||||
logln("Skipping, UCONFIG_NO_FORMATTING is set\n");
|
||||
return;
|
||||
#else
|
||||
static const char* DATA[] = {
|
||||
// ID, forward name, reverse name
|
||||
// Update the text as necessary -- the important thing is
|
||||
|
@ -3109,6 +3113,7 @@ void TransliteratorTest::TestDisplayName() {
|
|||
}
|
||||
delete t;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void TransliteratorTest::TestSpecialCases(void) {
|
||||
|
|
Loading…
Add table
Reference in a new issue