2001-10-10 21:43:11 +00:00
|
|
|
/*
|
|
|
|
*******************************************************************************
|
2007-10-24 00:38:03 +00:00
|
|
|
* Copyright (C) 1996-2007, International Business Machines Corporation and *
|
2001-10-10 21:43:11 +00:00
|
|
|
* others. All Rights Reserved. *
|
|
|
|
*******************************************************************************
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ITRBNF_H
|
|
|
|
#define ITRBNF_H
|
|
|
|
|
|
|
|
#include "unicode/utypes.h"
|
2002-09-21 00:43:14 +00:00
|
|
|
|
|
|
|
#if !UCONFIG_NO_FORMATTING
|
|
|
|
|
|
|
|
#include "intltest.h"
|
2001-10-10 21:43:11 +00:00
|
|
|
#include "unicode/rbnf.h"
|
|
|
|
|
|
|
|
|
|
|
|
class IntlTestRBNF : public IntlTest {
|
|
|
|
public:
|
|
|
|
|
|
|
|
// IntlTest override
|
|
|
|
virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par);
|
|
|
|
|
2002-03-14 00:28:22 +00:00
|
|
|
#if U_HAVE_RBNF
|
2001-11-28 01:00:56 +00:00
|
|
|
/**
|
|
|
|
* Perform an API test
|
|
|
|
*/
|
|
|
|
virtual void TestAPI();
|
|
|
|
|
2001-11-28 23:34:01 +00:00
|
|
|
/**
|
|
|
|
* Perform a simple spot check on the FractionalRuleSet logic
|
|
|
|
*/
|
|
|
|
virtual void TestFractionalRuleSet();
|
|
|
|
|
2002-03-14 00:28:22 +00:00
|
|
|
#if 0
|
2001-11-29 23:49:09 +00:00
|
|
|
/**
|
|
|
|
* Perform API tests on llong
|
|
|
|
*/
|
|
|
|
virtual void TestLLong();
|
2001-11-30 22:23:45 +00:00
|
|
|
virtual void TestLLongConstructors();
|
|
|
|
virtual void TestLLongSimpleOperators();
|
2002-03-14 00:28:22 +00:00
|
|
|
#endif
|
2001-11-29 23:49:09 +00:00
|
|
|
|
2001-10-10 21:43:11 +00:00
|
|
|
/**
|
|
|
|
* Perform a simple spot check on the English spellout rules
|
|
|
|
*/
|
|
|
|
virtual void TestEnglishSpellout();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Perform a simple spot check on the English ordinal-abbreviation rules
|
|
|
|
*/
|
|
|
|
virtual void TestOrdinalAbbreviations();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Perform a simple spot check on the duration-formatting rules
|
|
|
|
*/
|
|
|
|
virtual void TestDurations();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Perform a simple spot check on the Spanish spellout rules
|
|
|
|
*/
|
|
|
|
virtual void TestSpanishSpellout();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Perform a simple spot check on the French spellout rules
|
|
|
|
*/
|
|
|
|
virtual void TestFrenchSpellout();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Perform a simple spot check on the Swiss French spellout rules
|
|
|
|
*/
|
|
|
|
virtual void TestSwissFrenchSpellout();
|
|
|
|
|
2003-04-22 23:55:03 +00:00
|
|
|
/**
|
|
|
|
* Check that Belgian French matches Swiss French spellout rules
|
|
|
|
*/
|
|
|
|
virtual void TestBelgianFrenchSpellout();
|
|
|
|
|
2001-10-10 21:43:11 +00:00
|
|
|
/**
|
|
|
|
* Perform a simple spot check on the Italian spellout rules
|
|
|
|
*/
|
|
|
|
virtual void TestItalianSpellout();
|
|
|
|
|
2007-08-29 19:42:49 +00:00
|
|
|
/**
|
|
|
|
* Perform a simple spot check on the Portuguese spellout rules
|
|
|
|
*/
|
|
|
|
virtual void TestPortugueseSpellout();
|
|
|
|
|
2001-10-10 21:43:11 +00:00
|
|
|
/**
|
|
|
|
* Perform a simple spot check on the German spellout rules
|
|
|
|
*/
|
|
|
|
virtual void TestGermanSpellout();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Perform a simple spot check on the Thai spellout rules
|
|
|
|
*/
|
|
|
|
virtual void TestThaiSpellout();
|
|
|
|
|
2002-07-12 20:37:14 +00:00
|
|
|
/**
|
|
|
|
* Perform a simple spot check on the Swedish spellout rules
|
|
|
|
*/
|
|
|
|
virtual void TestSwedishSpellout();
|
|
|
|
|
2004-03-24 00:40:49 +00:00
|
|
|
/**
|
|
|
|
* Perform a simple spot check on small values
|
|
|
|
*/
|
|
|
|
virtual void TestSmallValues();
|
|
|
|
|
2004-09-24 22:58:00 +00:00
|
|
|
/**
|
|
|
|
* Test localizations using string data.
|
|
|
|
*/
|
|
|
|
virtual void TestLocalizations();
|
|
|
|
|
2004-12-02 21:49:50 +00:00
|
|
|
/**
|
|
|
|
* Test that all locales construct ok.
|
|
|
|
*/
|
|
|
|
virtual void TestAllLocales();
|
|
|
|
|
2005-07-08 18:23:44 +00:00
|
|
|
/**
|
|
|
|
* Test that hebrew fractions format without trailing '<'
|
|
|
|
*/
|
|
|
|
virtual void TestHebrewFraction();
|
|
|
|
|
2007-10-24 00:38:03 +00:00
|
|
|
/**
|
|
|
|
* Regression test, don't truncate
|
|
|
|
* when doing multiplier substitution to a number format rule.
|
|
|
|
*/
|
|
|
|
virtual void TestMultiplierSubstitution();
|
|
|
|
|
2001-10-10 21:43:11 +00:00
|
|
|
protected:
|
2006-10-01 06:45:25 +00:00
|
|
|
virtual void doTest(RuleBasedNumberFormat* formatter, const char* const testData[][2], UBool testParsing);
|
2001-10-10 21:43:11 +00:00
|
|
|
virtual void doLenientParseTest(RuleBasedNumberFormat* formatter, const char* testData[][2]);
|
2002-03-14 00:28:22 +00:00
|
|
|
|
|
|
|
/* U_HAVE_RBNF */
|
|
|
|
#else
|
|
|
|
|
|
|
|
virtual void TestRBNFDisabled();
|
|
|
|
|
|
|
|
/* U_HAVE_RBNF */
|
|
|
|
#endif
|
2001-10-10 21:43:11 +00:00
|
|
|
};
|
|
|
|
|
2002-09-21 00:43:14 +00:00
|
|
|
#endif /* #if !UCONFIG_NO_FORMATTING */
|
|
|
|
|
2001-10-10 21:43:11 +00:00
|
|
|
// endif ITRBNF_H
|
|
|
|
#endif
|