ICU-5366 The Greek RBNF rules don't exist. The default locale's rules shouldn't be tested this way.

X-SVN-Rev: 20646
This commit is contained in:
George Rhoten 2006-11-09 00:51:18 +00:00
parent 817364a7eb
commit ed884bf936
2 changed files with 9 additions and 9 deletions

View File

@ -1,6 +1,6 @@
/* /*
******************************************************************************* *******************************************************************************
* Copyright (C) 1996-2003, International Business Machines Corporation and * * Copyright (C) 1996-2006, International Business Machines Corporation and *
* others. All Rights Reserved. * * others. All Rights Reserved. *
******************************************************************************* *******************************************************************************
*/ */
@ -42,7 +42,7 @@ void RbnfRoundTripTest::runIndexedTest(int32_t index, UBool exec, const char* &n
TESTCASE(8, TestDutchSpelloutRT); TESTCASE(8, TestDutchSpelloutRT);
TESTCASE(9, TestJapaneseSpelloutRT); TESTCASE(9, TestJapaneseSpelloutRT);
TESTCASE(10, TestRussianSpelloutRT); TESTCASE(10, TestRussianSpelloutRT);
TESTCASE(11, TestGreekSpelloutRT); TESTCASE(11, TestPortugueseSpelloutRT);
#else #else
TESTCASE(0, TestRBNFDisabled); TESTCASE(0, TestRBNFDisabled);
#endif #endif
@ -253,19 +253,19 @@ RbnfRoundTripTest::TestRussianSpelloutRT()
} }
/** /**
* Perform an exhaustive round-trip test on the Greek spellout rules * Perform an exhaustive round-trip test on the Portuguese spellout rules
*/ */
void void
RbnfRoundTripTest::TestGreekSpelloutRT() RbnfRoundTripTest::TestPortugueseSpelloutRT()
{ {
UErrorCode status = U_ZERO_ERROR; UErrorCode status = U_ZERO_ERROR;
RuleBasedNumberFormat* formatter RuleBasedNumberFormat* formatter
= new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale("el", "GR"), status); = new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale("pt", "BR"), status);
if (U_FAILURE(status)) { if (U_FAILURE(status)) {
errln("failed to construct formatter"); errln("failed to construct formatter");
} else { } else {
doTest(formatter, 0, 12345678); doTest(formatter, -12345678, 12345678);
} }
delete formatter; delete formatter;
} }

View File

@ -1,6 +1,6 @@
/* /*
******************************************************************************* *******************************************************************************
* Copyright (C) 1996-2000, International Business Machines Corporation and * * Copyright (C) 1996-2006, International Business Machines Corporation and *
* others. All Rights Reserved. * * others. All Rights Reserved. *
******************************************************************************* *******************************************************************************
*/ */
@ -77,9 +77,9 @@ class RbnfRoundTripTest : public IntlTest {
virtual void TestRussianSpelloutRT(); virtual void TestRussianSpelloutRT();
/** /**
* Perform an exhaustive round-trip test on the Greek spellout rules * Perform an exhaustive round-trip test on the Portuguese spellout rules
*/ */
virtual void TestGreekSpelloutRT(); virtual void TestPortugueseSpelloutRT();
protected: protected:
void doTest(const RuleBasedNumberFormat* formatter, double lowLimit, double highLimit); void doTest(const RuleBasedNumberFormat* formatter, double lowLimit, double highLimit);