summaryrefslogtreecommitdiff
path: root/Build/source/libs/icu/icu-src/source/test/intltest/itrbnfrt.h
blob: f8efab77be5206209bd0688a81b71972acc433ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
 *******************************************************************************
 * Copyright (C) 1996-2006, International Business Machines Corporation and    *
 * others. All Rights Reserved.                                                *
 *******************************************************************************
 */

#ifndef ITRBNFRT_H
#define ITRBNFRT_H

#include "unicode/utypes.h"

#if !UCONFIG_NO_FORMATTING

#include "intltest.h"
#include "unicode/rbnf.h"

class RbnfRoundTripTest : public IntlTest {

  // IntlTest override
  virtual void runIndexedTest(int32_t index, UBool exec, const char* &name, char* par);

#if U_HAVE_RBNF
  /**
   * Perform an exhaustive round-trip test on the English spellout rules
   */
  virtual void TestEnglishSpelloutRT();

  /**
   * Perform an exhaustive round-trip test on the duration-formatting rules
   */
  virtual void TestDurationsRT();

  /**
   * Perform an exhaustive round-trip test on the Spanish spellout rules
   */
  virtual void TestSpanishSpelloutRT();

  /**
   * Perform an exhaustive round-trip test on the French spellout rules
   */
  virtual void TestFrenchSpelloutRT();

  /**
   * Perform an exhaustive round-trip test on the Swiss French spellout rules
   */
  virtual void TestSwissFrenchSpelloutRT();

  /**
   * Perform an exhaustive round-trip test on the Italian spellout rules
   */
  virtual void TestItalianSpelloutRT();

  /**
   * Perform an exhaustive round-trip test on the German spellout rules
   */
  virtual void TestGermanSpelloutRT();

  /**
   * Perform an exhaustive round-trip test on the Swedish spellout rules
   */
  virtual void TestSwedishSpelloutRT();

  /**
   * Perform an exhaustive round-trip test on the Dutch spellout rules
   */
  virtual void TestDutchSpelloutRT();

  /**
   * Perform an exhaustive round-trip test on the Japanese spellout rules
   */
  virtual void TestJapaneseSpelloutRT();

  /**
   * Perform an exhaustive round-trip test on the Russian spellout rules
   */
  virtual void TestRussianSpelloutRT();

  /**
   * Perform an exhaustive round-trip test on the Portuguese spellout rules
   */
  virtual void TestPortugueseSpelloutRT();

 protected:
  void doTest(const RuleBasedNumberFormat* formatter,  double lowLimit, double highLimit);

  /* U_HAVE_RBNF */
#else

  void TestRBNFDisabled();

  /* U_HAVE_RBNF */
#endif
};

#endif /* #if !UCONFIG_NO_FORMATTING */

// endif ITRBNFRT_H
#endif