]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/intltest/numbertest.h
ICU-66108.tar.gz
[apple/icu.git] / icuSources / test / intltest / numbertest.h
index e1c90a75a85759c99c237925cf864f0acbf4d2e0..7f5bcdf4a8ef368ea733a0e2b92423ce5f4b2c1b 100644 (file)
@@ -6,11 +6,11 @@
 #if !UCONFIG_NO_FORMATTING
 #pragma once
 
-#include "number_stringbuilder.h"
+#include "formatted_string_builder.h"
 #include "intltest.h"
 #include "itformat.h"
 #include "number_affixutils.h"
-#include "numparse_stringsegment.h"
+#include "string_segment.h"
 #include "numrange_impl.h"
 #include "unicode/locid.h"
 #include "unicode/numberformatter.h"
@@ -68,9 +68,11 @@ class NumberFormatterApiTest : public IntlTestWithFieldPosition {
     // TODO: Add this method if currency symbols override support is added.
     //void symbolsOverride();
     void sign();
+    void signCoverage();
     void decimal();
     void scale();
     void locale();
+    void skeletonUserGuideExamples();
     void formatTypes();
     void fieldPositionLogic();
     void fieldPositionCoverage();
@@ -80,6 +82,7 @@ class NumberFormatterApiTest : public IntlTestWithFieldPosition {
     void copyMove();
     void localPointerCAPI();
     void toObject();
+    void toDecimalNumber();
 
     void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0);
 
@@ -173,7 +176,7 @@ class ModifiersTest : public IntlTest {
                               UnicodeString expectedChars, UnicodeString expectedFields,
                               UErrorCode &status);
 
-    void assertModifierEquals(const Modifier &mod, NumberStringBuilder &sb, int32_t expectedPrefixLength,
+    void assertModifierEquals(const Modifier &mod, FormattedStringBuilder &sb, int32_t expectedPrefixLength,
                               bool expectedStrong, UnicodeString expectedChars,
                               UnicodeString expectedFields, UErrorCode &status);
 };
@@ -203,33 +206,6 @@ class PatternStringTest : public IntlTest {
   private:
 };
 
-class NumberStringBuilderTest : public IntlTest {
-  public:
-    void testInsertAppendUnicodeString();
-    void testSplice();
-    void testInsertAppendCodePoint();
-    void testCopy();
-    void testFields();
-    void testUnlimitedCapacity();
-    void testCodePoints();
-
-    void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0);
-
-  private:
-    void assertEqualsImpl(const UnicodeString &a, const NumberStringBuilder &b);
-};
-
-class StringSegmentTest : public IntlTest {
-  public:
-    void testOffset();
-    void testLength();
-    void testCharAt();
-    void testGetCodePoint();
-    void testCommonPrefixLength();
-
-    void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0);
-};
-
 class NumberParserTest : public IntlTest {
   public:
     void testBasic();
@@ -312,6 +288,13 @@ class NumberRangeFormatterTest : public IntlTestWithFieldPosition {
       const char16_t* expected);
 };
 
+class NumberPermutationTest : public IntlTest {
+  public:
+    void testPermutations();
+
+    void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0);
+};
+
 
 // NOTE: This macro is identical to the one in itformat.cpp
 #define TESTCLASS(id, TestClass)          \
@@ -339,12 +322,11 @@ class NumberTest : public IntlTest {
         TESTCLASS(3, ModifiersTest);
         TESTCLASS(4, PatternModifierTest);
         TESTCLASS(5, PatternStringTest);
-        TESTCLASS(6, NumberStringBuilderTest);
-        TESTCLASS(7, DoubleConversionTest);
-        TESTCLASS(8, StringSegmentTest);
-        TESTCLASS(9, NumberParserTest);
-        TESTCLASS(10, NumberSkeletonTest);
-        TESTCLASS(11, NumberRangeFormatterTest);
+        TESTCLASS(6, DoubleConversionTest);
+        TESTCLASS(7, NumberParserTest);
+        TESTCLASS(8, NumberSkeletonTest);
+        TESTCLASS(9, NumberRangeFormatterTest);
+        TESTCLASS(10, NumberPermutationTest);
         default: name = ""; break; // needed to end loop
         }
     }