#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"
// 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();
void copyMove();
void localPointerCAPI();
void toObject();
+ void toDecimalNumber();
void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par = 0);
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);
};
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();
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) \
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
}
}