]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/intltest/numfmtst.h
ICU-59131.0.1.tar.gz
[apple/icu.git] / icuSources / test / intltest / numfmtst.h
index f25a4250a69b77efa9526d43c5426a0fe9068f8e..17a411a28d5308a1aaa1978516db19f57f857c60 100644 (file)
@@ -1,6 +1,8 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /************************************************************************
  * COPYRIGHT:
- * Copyright (c) 1997-2014, International Business Machines Corporation
+ * Copyright (c) 1997-2016, International Business Machines Corporation
  * and others. All Rights Reserved.
  ************************************************************************/
 
 #include "unicode/decimfmt.h"
 #include "caltztst.h"
 
+/**
+ * Expected field positions from field position iterator. Tests should
+ * stack allocate an array of these making sure that the last element is
+ * {0, -1, 0} (The sentinel element indicating end of iterator). Then test
+ * should call verifyFieldPositionIterator() passing both this array of
+ * expected results and the field position iterator from the format method.
+ */
+struct NumberFormatTest_Attributes {
+    int32_t id;
+    int32_t spos;
+    int32_t epos;
+};
+
 /**
  * Performs various in-depth test on NumberFormat
  **/
@@ -182,6 +197,27 @@ class NumberFormatTest: public CalendarTimeZoneTest {
     void TestAccountingCurrency();
     void TestEquality();
 
+    void TestCurrencyUsage();
+    void TestNumberFormatTestTuple();
+    void TestDataDriven();
+
+    void TestDoubleLimit11439();
+    void TestFastPathConsistent11524();
+    void TestGetAffixes();
+    void TestToPatternScientific11648();
+    void TestBenchmark();
+    void TestCtorApplyPatternDifference();
+    void TestFractionalDigitsForCurrency();
+    void TestFormatCurrencyPlural();
+    void Test11868();
+    void Test10727_RoundingZero();
+    void Test11376_getAndSetPositivePrefix();
+    void Test11475_signRecognition();
+    void Test11640_getAffixes();
+    void Test11649_toPatternWithMultiCurrency();
+
+    void checkExceptionIssue11735();
+
  private:
     UBool testFormattableAsUFormattable(const char *file, int line, Formattable &f);
 
@@ -301,6 +337,10 @@ class NumberFormatTest: public CalendarTimeZoneTest {
         int32_t valueSize,
         int32_t roundingModeSize);
 
+    void verifyFieldPositionIterator(
+            NumberFormatTest_Attributes *expected,
+            FieldPositionIterator &iter);
+
 };
 
 #endif /* #if !UCONFIG_NO_FORMATTING */