HomeSort by relevance Sort by last modified time
    Searched full:numberformat (Results 1 - 25 of 594) sorted by null

1 2 3 4 5 6 7 8 91011>>

  /external/icu/icu4c/source/i18n/
sharednumberformat.h 17 class NumberFormat;
21 SharedNumberFormat(NumberFormat *nfToAdopt) : ptr(nfToAdopt) { }
23 const NumberFormat *get() const { return ptr; }
24 const NumberFormat *operator->() const { return ptr; }
25 const NumberFormat &operator*() const { return *ptr; }
27 NumberFormat *ptr;
  /external/icu/icu4j/eclipse-build/plugins.template/com.ibm.icu.base.tests/src/com/ibm/icu/tests/
NumberFormatTest.java 16 import com.ibm.icu.text.NumberFormat;
22 * Test method for 'com.ibm.icu.x.text.NumberFormat.NumberFormat(NumberFormat)'
25 NumberFormat nf = new NumberFormat(java.text.NumberFormat.getInstance());
26 assertEquals(nf, NumberFormat.getInstance());
30 * Test method for 'com.ibm.icu.x.text.NumberFormat.format(Object, StringBuffer, FieldPosition)'
35 FieldPosition fp = new FieldPosition(NumberFormat.INTEGER_FIELD)
    [all...]
  /libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
Support_DecimalFormat.java 21 import java.text.NumberFormat;
41 DecimalFormat format = (DecimalFormat) NumberFormat.getCurrencyInstance(Locale.US);
45 t_FormatWithField(0, format, number, text, NumberFormat.Field.CURRENCY, 0, 1);
46 t_FormatWithField(1, format, number, text, NumberFormat.Field.INTEGER, 1, 11);
47 t_FormatWithField(2, format, number, text, NumberFormat.Field.GROUPING_SEPARATOR, 3, 4);
48 t_FormatWithField(3, format, number, text, NumberFormat.Field.DECIMAL_SEPARATOR, 11, 12);
49 t_FormatWithField(4, format, number, text, NumberFormat.Field.FRACTION, 12, 14);
52 t_FormatWithField(5, format, number, text, NumberFormat.Field.SIGN, 0, 0);
53 t_FormatWithField(6, format, number, text, NumberFormat.Field.EXPONENT, 0, 0);
54 t_FormatWithField(7, format, number, text, NumberFormat.Field.EXPONENT_SIGN, 0, 0)
    [all...]
NumberFormatTest.java 23 import java.text.NumberFormat;
32 * @tests java.text.NumberFormat#format(java.lang.Object,
38 DecimalFormat format = (DecimalFormat) NumberFormat
118 * @tests java.text.NumberFormat#getIntegerInstance()
121 // Test for method java.text.NumberFormat getIntegerInstance()
125 DecimalFormat format = (DecimalFormat) NumberFormat
129 "Test1: NumberFormat.getIntegerInstance().toPattern() returned wrong pattern",
132 "Test2: NumberFormat.getIntegerInstance().format(35.76) returned wrong value",
135 "Test3: NumberFormat.getIntegerInstance().parse(\"35.76\") returned wrong number",
138 "Test4: NumberFormat.getIntegerInstance().parseObject(\"35.76\") returned wrong number"
    [all...]
  /libcore/support/src/test/java/tests/support/
Support_DecimalFormat.java 21 import java.text.NumberFormat;
42 DecimalFormat format = (DecimalFormat) NumberFormat
47 t_FormatWithField(0, format, number, text, NumberFormat.Field.CURRENCY,
49 t_FormatWithField(1, format, number, text, NumberFormat.Field.INTEGER,
52 NumberFormat.Field.GROUPING_SEPARATOR, 3, 4);
54 NumberFormat.Field.DECIMAL_SEPARATOR, 11, 12);
55 t_FormatWithField(4, format, number, text, NumberFormat.Field.FRACTION,
59 t_FormatWithField(5, format, number, text, NumberFormat.Field.SIGN, 0,
61 t_FormatWithField(6, format, number, text, NumberFormat.Field.EXPONENT,
64 NumberFormat.Field.EXPONENT_SIGN, 0, 0)
    [all...]
  /external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/
NumberFormatRegistrationTest.java 12 import android.icu.text.NumberFormat;
13 import android.icu.text.NumberFormat.SimpleNumberFormatFactory;
30 NumberFormat currencyStyle;
38 currencyStyle = NumberFormat.getIntegerInstance(swapLoc);
41 public NumberFormat createFormat(ULocale loc, int formatType) {
53 NumberFormat.unregister(null);
61 NumberFormat.registerFactory(null);
73 if (NumberFormat.unregister("")) {
82 NumberFormat f0 = NumberFormat.getIntegerInstance(SWAP_LOC)
    [all...]
IntlTestDecimalFormatAPIC.java 28 import android.icu.text.NumberFormat;
76 cust2 = new DecimalFormat(pattern, symbols, infoInput, NumberFormat.PLURALCURRENCYSTYLE);
245 // NumberFormat test = new DecimalFormat();
312 t_Format(1, number, NumberFormat.getNumberInstance(us),
316 t_Format(3, number, NumberFormat.getPercentInstance(us),
332 t_Format(7, number, NumberFormat.getCurrencyInstance(us),
336 t_Format(8, negativeNumber, NumberFormat.getCurrencyInstance(us),
341 t_Format(11, number, NumberFormat.getNumberInstance(us),
346 t_Format(12, number, NumberFormat.getNumberInstance(us),
352 v.add(new FieldContainer(0, 3, NumberFormat.Field.INTEGER))
    [all...]
WriteNumberFormatSerialTestData.java 16 import android.icu.text.NumberFormat;
40 NumberFormat nf = NumberFormat.getInstance(Locale.US);
41 NumberFormat nfc = NumberFormat.getCurrencyInstance(Locale.US);
42 NumberFormat nfp = NumberFormat.getPercentInstance(Locale.US);
43 NumberFormat nfsp = NumberFormat.getScientificInstance(Locale.US);
48 write(file,(Object)nf,"generalInstance", "//NumberFormat.getInstance(Locale.US)")
    [all...]
IntlTestNumberFormatAPI.java 25 import android.icu.text.NumberFormat;
40 logln("NumberFormat API test---"); logln("");
45 logln("Testing NumberFormat constructors");
47 NumberFormat def = NumberFormat.getInstance();
49 NumberFormat fr = NumberFormat.getInstance(Locale.FRENCH);
51 NumberFormat cur = NumberFormat.getCurrencyInstance();
53 NumberFormat cur_fr = NumberFormat.getCurrencyInstance(Locale.FRENCH)
    [all...]
  /external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
NumberFormatRegistrationTest.java 11 import com.ibm.icu.text.NumberFormat;
12 import com.ibm.icu.text.NumberFormat.SimpleNumberFormatFactory;
26 NumberFormat currencyStyle;
34 currencyStyle = NumberFormat.getIntegerInstance(swapLoc);
37 public NumberFormat createFormat(ULocale loc, int formatType) {
49 NumberFormat.unregister(null);
57 NumberFormat.registerFactory(null);
69 if (NumberFormat.unregister("")) {
78 NumberFormat f0 = NumberFormat.getIntegerInstance(SWAP_LOC)
    [all...]
IntlTestNumberFormatAPI.java 24 import com.ibm.icu.text.NumberFormat;
36 logln("NumberFormat API test---"); logln("");
41 logln("Testing NumberFormat constructors");
43 NumberFormat def = NumberFormat.getInstance();
45 NumberFormat fr = NumberFormat.getInstance(Locale.FRENCH);
47 NumberFormat cur = NumberFormat.getCurrencyInstance();
49 NumberFormat cur_fr = NumberFormat.getCurrencyInstance(Locale.FRENCH)
    [all...]
IntlTestDecimalFormatAPIC.java 27 import com.ibm.icu.text.NumberFormat;
72 cust2 = new DecimalFormat(pattern, symbols, infoInput, NumberFormat.PLURALCURRENCYSTYLE);
241 // NumberFormat test = new DecimalFormat();
308 t_Format(1, number, NumberFormat.getNumberInstance(us),
312 t_Format(3, number, NumberFormat.getPercentInstance(us),
328 t_Format(7, number, NumberFormat.getCurrencyInstance(us),
332 t_Format(8, negativeNumber, NumberFormat.getCurrencyInstance(us),
337 t_Format(11, number, NumberFormat.getNumberInstance(us),
342 t_Format(12, number, NumberFormat.getNumberInstance(us),
348 v.add(new FieldContainer(0, 3, NumberFormat.Field.INTEGER))
    [all...]
WriteNumberFormatSerialTestData.java 15 import com.ibm.icu.text.NumberFormat;
39 NumberFormat nf = NumberFormat.getInstance(Locale.US);
40 NumberFormat nfc = NumberFormat.getCurrencyInstance(Locale.US);
41 NumberFormat nfp = NumberFormat.getPercentInstance(Locale.US);
42 NumberFormat nfsp = NumberFormat.getScientificInstance(Locale.US);
47 write(file,(Object)nf,"generalInstance", "//NumberFormat.getInstance(Locale.US)")
    [all...]
  /libcore/luni/src/test/java/libcore/java/text/
OldNumberFormatTest.java 22 import java.text.NumberFormat;
32 DecimalFormat format = (DecimalFormat) NumberFormat.getIntegerInstance(Locale.US);
42 format = (DecimalFormat) NumberFormat.getIntegerInstance(chLocale);
51 format = (DecimalFormat) NumberFormat.getIntegerInstance(arLocale);
66 NumberFormat format = NumberFormat.getInstance();
78 NumberFormat format = NumberFormat.getInstance(new Locale("hu", "HU"));
86 ((NumberFormat) cformat).setCurrency(currA);
92 NumberFormat.getInstance().setCurrency(null)
    [all...]
NumberFormatTest.java 24 import java.text.NumberFormat;
30 // NumberFormat.format(Object, StringBuffer, FieldPosition) guarantees it calls doubleValue for
42 NumberFormat nf = NumberFormat.getNumberInstance(Locale.US);
46 // NumberFormat.format(Object, StringBuffer, FieldPosition) guarantees it calls longValue for
49 class MyNumberFormat extends NumberFormat {
62 NumberFormat nf = new MyNumberFormat();
72 NumberFormat numberFormat = NumberFormat.getNumberInstance(new Locale("ar"))
    [all...]
  /external/v8/test/intl/number-format/
check-digit-ranges.js 31 assertThrows('Intl.NumberFormat(undefined, {minimumIntegerDigits: 0})');
32 assertThrows('Intl.NumberFormat(undefined, {minimumIntegerDigits: 22})');
33 assertThrows('Intl.NumberFormat(undefined, {minimumIntegerDigits: null})');
34 assertThrows('Intl.NumberFormat(undefined, {minimumIntegerDigits: Infinity})');
35 assertThrows('Intl.NumberFormat(undefined, {minimumIntegerDigits: -Infinity})');
36 assertThrows('Intl.NumberFormat(undefined, {minimumIntegerDigits: x})');
38 assertThrows('Intl.NumberFormat(undefined, {minimumFractionDigits: -1})');
39 assertThrows('Intl.NumberFormat(undefined, {maximumFractionDigits: 21})');
41 assertThrows('Intl.NumberFormat(undefined, {minimumSignificantDigits: 0})');
42 assertThrows('Intl.NumberFormat(undefined, {maximumSignificantDigits: 22})')
    [all...]
  /external/icu/icu4j/main/classes/localespi/src/com/ibm/icu/impl/javaspi/text/
NumberFormatProviderICU.java 9 import java.text.NumberFormat;
26 public NumberFormat getCurrencyInstance(Locale locale) {
31 public NumberFormat getIntegerInstance(Locale locale) {
36 public NumberFormat getNumberInstance(Locale locale) {
41 public NumberFormat getPercentInstance(Locale locale) {
50 private NumberFormat getInstance(int type, Locale locale) {
51 com.ibm.icu.text.NumberFormat icuNfmt;
55 icuNfmt = com.ibm.icu.text.NumberFormat.getNumberInstance(actual);
58 icuNfmt = com.ibm.icu.text.NumberFormat.getIntegerInstance(actual);
61 icuNfmt = com.ibm.icu.text.NumberFormat.getCurrencyInstance(actual)
    [all...]
  /external/icu/android_icu4j/src/main/java/android/icu/text/
NumberFormatServiceShim.java 22 import android.icu.text.NumberFormat.NumberFormatFactory;
26 class NumberFormatServiceShim extends NumberFormat.NumberFormatShim {
77 NumberFormat createInstance(ULocale desiredLocale, int choice) {
81 // return NumberFormat.createInstance(desiredLocale, choice);
85 NumberFormat fmt = (NumberFormat)service.get(desiredLocale, choice,
88 throw new MissingResourceException("Unable to construct NumberFormat", "", "");
90 fmt = (NumberFormat)fmt.clone();
94 if ( choice == NumberFormat.CURRENCYSTYLE ||
95 choice == NumberFormat.ISOCURRENCYSTYLE ||
    [all...]
  /external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
NumberFormatServiceShim.java 21 import com.ibm.icu.text.NumberFormat.NumberFormatFactory;
25 class NumberFormatServiceShim extends NumberFormat.NumberFormatShim {
76 NumberFormat createInstance(ULocale desiredLocale, int choice) {
80 // return NumberFormat.createInstance(desiredLocale, choice);
84 NumberFormat fmt = (NumberFormat)service.get(desiredLocale, choice,
87 throw new MissingResourceException("Unable to construct NumberFormat", "", "");
89 fmt = (NumberFormat)fmt.clone();
93 if ( choice == NumberFormat.CURRENCYSTYLE ||
94 choice == NumberFormat.ISOCURRENCYSTYLE ||
    [all...]
  /external/icu/icu4c/source/test/intltest/
nmfmapts.cpp 27 case 0: name = "NumberFormat API test";
29 logln("NumberFormat API test---"); logln("");
42 logln("NumberFormat Registration test---"); logln("");
59 * NumberFormat.
67 logln("Testing NumberFormat constructors");
69 NumberFormat *def = NumberFormat::createInstance(status);
71 dataerrln("ERROR: Could not create NumberFormat (default) - %s", u_errorName(status));
75 NumberFormat *fr = NumberFormat::createInstance(Locale::getFrench(), status)
    [all...]
nmfmtrt.h 19 * Performs round-trip tests for NumberFormat
38 void test(NumberFormat *fmt);
39 void test(NumberFormat *fmt, double value);
40 void test(NumberFormat *fmt, int32_t value);
41 void test(NumberFormat *fmt, const Formattable& value);
numfmtst.h 32 * Performs various in-depth test on NumberFormat
220 void expectParseCurrency(const NumberFormat &fmt, const UChar* currency, double amount, const char *text);
230 void expect2(NumberFormat& fmt, const Formattable& n, const UnicodeString& str);
232 void expect3(NumberFormat& fmt, const Formattable& n, const UnicodeString& str);
234 void expect2(NumberFormat& fmt, const Formattable& n, const char* str) {
238 void expect2(NumberFormat* fmt, const Formattable& n, const UnicodeString& str, UErrorCode ec);
240 void expect2(NumberFormat* fmt, const Formattable& n, const char* str, UErrorCode ec) {
244 void expect(NumberFormat& fmt, const UnicodeString& str, const Formattable& n);
246 void expect(NumberFormat& fmt, const char *str, const Formattable& n) {
250 void expect(NumberFormat& fmt, const Formattable& n
    [all...]
  /external/icu/icu4j/main/tests/localespi/src/com/ibm/icu/dev/test/localespi/
NumberFormatTest.java 11 import java.text.NumberFormat;
33 for (Locale loc : NumberFormat.getAvailableLocales()) {
47 NumberFormat nf;
55 errln("FAIL: " + method[0] + " returned JDK NumberFormat for locale " + loc);
59 logln("INFO: " + method[0] + " returned ICU NumberFormat for locale " + loc);
62 NumberFormat nfIcu = null;
66 errln("FAIL: " + method[0] + " returned ICU NumberFormat for locale " + loc
72 errln("FAIL: " + method[0] + " returned JDK NumberFormat for locale " + iculoc);
78 private NumberFormat getJDKInstance(int type, Locale loc, String[] methodName) {
79 NumberFormat nf = null
    [all...]
  /external/icu/android_icu4j/src/main/tests/android/icu/dev/util/
ElapsedTimer.java 14 import android.icu.text.NumberFormat;
28 * More advanced: NumberFormat and/or MessageFormat can be provided in the constructor
46 private NumberFormat myDurationFormat = null;
56 public ElapsedTimer(NumberFormat aNumFmt) {
60 public ElapsedTimer(MessageFormat aMsgFmt, NumberFormat aNumFmt) {
69 public ElapsedTimer(String pattern, NumberFormat aNumFmt) {
87 private static NumberFormat gFormat = null;
89 private static NumberFormat getFormat() {
97 private static String diffTime(NumberFormat fmt, long start, long end) {
  /external/icu/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/
ElapsedTimer.java 13 import com.ibm.icu.text.NumberFormat;
27 * More advanced: NumberFormat and/or MessageFormat can be provided in the constructor
45 private NumberFormat myDurationFormat = null;
55 public ElapsedTimer(NumberFormat aNumFmt) {
59 public ElapsedTimer(MessageFormat aMsgFmt, NumberFormat aNumFmt) {
68 public ElapsedTimer(String pattern, NumberFormat aNumFmt) {
86 private static NumberFormat gFormat = null;
88 private static NumberFormat getFormat() {
96 private static String diffTime(NumberFormat fmt, long start, long end) {

Completed in 1164 milliseconds

1 2 3 4 5 6 7 8 91011>>