Home
last modified time | relevance | path

Searched refs:currency (Results 1 – 11 of 11) sorted by relevance

/libcore/luni/src/test/java/libcore/java/util/
DCurrencyTest.java39 Currency currency = Currency.getInstance("DEM"); in test_getSymbol_locale() local
40 assertEquals("DEM", currency.getSymbol(Locale.FRANCE)); in test_getSymbol_locale()
41 assertEquals("DM", currency.getSymbol(Locale.GERMANY)); in test_getSymbol_locale()
42 assertEquals("DEM", currency.getSymbol(Locale.US)); in test_getSymbol_locale()
51 Currency currency = Currency.getInstance("DEM"); in test_getSymbol_noLocaleArgument() local
55 assertEquals("DM", currency.getSymbol()); in test_getSymbol_noLocaleArgument()
83 Currency currency = Currency.getInstance("CHF"); in test_getDisplayName_locale_chf() local
84 assertEquals("Swiss Franc", currency.getDisplayName(Locale.US)); in test_getDisplayName_locale_chf()
85 assertEquals("Schweizer Franken", currency.getDisplayName(new Locale("de", "CH"))); in test_getDisplayName_locale_chf()
86 assertEquals("franc suisse", currency.getDisplayName(new Locale("fr", "CH"))); in test_getDisplayName_locale_chf()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DDecimalFormatSymbolsTest.java118 Currency currency = Currency.getInstance("USD"); in test_getCurrency() local
120 dfsUS.getCurrency(), currency); in test_getCurrency()
295 Currency currency = Currency.getInstance("JPY"); in test_setCurrencyLjava_util_Currency() local
296 dfs.setCurrency(currency); in test_setCurrencyLjava_util_Currency()
298 assertTrue("Returned incorrect currency", currency == dfs.getCurrency()); in test_setCurrencyLjava_util_Currency()
299 assertEquals("Returned incorrect currency symbol", currency.getSymbol( in test_setCurrencyLjava_util_Currency()
301 assertTrue("Returned incorrect international currency symbol", currency in test_setCurrencyLjava_util_Currency()
371 Currency currency = Currency.getInstance("JPY"); in test_setInternationalCurrencySymbolLjava_lang_String() local
372 dfs.setInternationalCurrencySymbol(currency.getCurrencyCode()); in test_setInternationalCurrencySymbolLjava_lang_String()
374 assertTrue("Test1: Returned incorrect currency", currency == dfs in test_setInternationalCurrencySymbolLjava_lang_String()
[all …]
DDecimalFormatTest.java1915 Currency currency = Currency.getInstance("AED"); in test_setCurrency() local
1916 df.setCurrency(currency); in test_setCurrency()
1917 assertTrue("Returned incorrect currency", currency == df.getCurrency()); in test_setCurrency()
1918 assertEquals("Returned incorrect currency symbol", currency.getSymbol(locale), in test_setCurrency()
1920 assertEquals("Returned incorrect international currency symbol", currency.getCurrencyCode(), in test_setCurrency()
/libcore/ojluni/src/main/java/java/text/
DDecimalFormatSymbols.java411 public void setCurrencySymbol(String currency) in setCurrencySymbol() argument
413 currencySymbol = currency; in setCurrencySymbol()
449 currency = null; in setInternationalCurrencySymbol()
452 currency = Currency.getInstance(currencyCode); in setInternationalCurrencySymbol()
454 currencySymbol = currency.getSymbol(locale); in setInternationalCurrencySymbol()
471 return currency; in getCurrency()
486 public void setCurrency(Currency currency) { in setCurrency() argument
487 if (currency == null) { in setCurrency()
490 this.currency = currency; in setCurrency()
491 intlCurrencySymbol = currency.getCurrencyCode(); in setCurrency()
[all …]
DDecimalFormat.java4089 public void setCurrency(Currency currency) { in setCurrency() argument
4101 if (currency != symbols.getCurrency() in setCurrency()
4102 || !currency.getSymbol().equals(symbols.getCurrencySymbol())) { in setCurrency()
4103 symbols.setCurrency(currency); in setCurrency()
4182 Currency currency = symbols.getCurrency(); in adjustForCurrencyDefaultFractionDigits() local
4183 if (currency == null) { in adjustForCurrencyDefaultFractionDigits()
4185 currency = Currency.getInstance(symbols.getInternationalCurrencySymbol()); in adjustForCurrencyDefaultFractionDigits()
4189 if (currency != null) { in adjustForCurrencyDefaultFractionDigits()
4190 int digits = currency.getDefaultFractionDigits(); in adjustForCurrencyDefaultFractionDigits()
DNumberFormat.java786 public void setCurrency(Currency currency) { in setCurrency() argument
/libcore/ojluni/src/main/java/java/util/
DCurrency.java425 Currency currency = getInstance(icuCurrency.getCurrencyCode()); in getAvailableCurrencies() local
426 if (currency == null) { in getAvailableCurrencies()
427 currency = new Currency(icuCurrency); in getAvailableCurrencies()
428 instances.put(currency.currencyCode, currency); in getAvailableCurrencies()
430 available.add(currency); in getAvailableCurrencies()
/libcore/luni/src/test/java/libcore/java/text/
DDecimalFormatTest.java309 Currency currency = Currency.getInstance(Locale.US); in testCurrencySymbolSpacing() local
314 assertCurrencyFormat("USD" + formattedZero, "\u00a4\u00a40", dfs, currency, locale); in testCurrencySymbolSpacing()
315 assertCurrencyFormat(formattedZero + "USD", "0\u00a4\u00a4", dfs, currency, locale); in testCurrencySymbolSpacing()
316 assertCurrencyFormat(currency.getSymbol(locale) + formattedZero, "\u00a40", dfs, in testCurrencySymbolSpacing()
317 currency, locale); in testCurrencySymbolSpacing() local
318 assertCurrencyFormat(formattedZero + currency.getSymbol(locale), "0\u00a4", dfs, in testCurrencySymbolSpacing()
319 currency, locale); in testCurrencySymbolSpacing()
325 Currency currency, Locale locale) { in assertCurrencyFormat() argument
327 df.setCurrency(currency); in assertCurrencyFormat()
343 Currency currency = Currency.getInstance("CNY"); in testSetCurrency_symbolOrigin() local
[all …]
/libcore/ojluni/annotations/hiddenapi/java/text/
DDecimalFormatSymbols.java160 public void setCurrencySymbol(java.lang.String currency) { in setCurrencySymbol() argument
176 public void setCurrency(java.util.Currency currency) { in setCurrency() argument
246 private transient java.util.Currency currency; field in DecimalFormatSymbols
DNumberFormat.java192 public void setCurrency(java.util.Currency currency) { in setCurrency() argument
/libcore/ojluni/annotations/sdk/nullability/java/text/
DNumberFormat.annotated.java124 public void setCurrency(@libcore.util.NonNull java.util.Currency currency) { throw new RuntimeExcep… in setCurrency() argument