LEFT | RIGHT |
1 // © 2016 and later: Unicode, Inc. and others. | 1 // © 2016 and later: Unicode, Inc. and others. |
2 // License & terms of use: http://www.unicode.org/copyright.html#License | 2 // License & terms of use: http://www.unicode.org/copyright.html#License |
3 /* | 3 /* |
4 ******************************************************************************* | 4 ******************************************************************************* |
5 * Copyright (C) 1996-2016, Google, International Business Machines Corporation
and | 5 * Copyright (C) 1996-2016, Google, International Business Machines Corporation
and |
6 * others. All Rights Reserved. * | 6 * others. All Rights Reserved. * |
7 ******************************************************************************* | 7 ******************************************************************************* |
8 */ | 8 */ |
9 package com.ibm.icu.dev.test.format; | 9 package com.ibm.icu.dev.test.format; |
10 | 10 |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 resultDefault, resultCdf); | 642 resultDefault, resultCdf); |
643 } | 643 } |
644 | 644 |
645 @Test | 645 @Test |
646 public void TestBug11534() { | 646 public void TestBug11534() { |
647 ULocale locale = new ULocale("pt_PT"); | 647 ULocale locale = new ULocale("pt_PT"); |
648 CompactDecimalFormat cdf = CompactDecimalFormat.getInstance(locale, Comp
actStyle.SHORT); | 648 CompactDecimalFormat cdf = CompactDecimalFormat.getInstance(locale, Comp
actStyle.SHORT); |
649 String result = cdf.format(1000); | 649 String result = cdf.format(1000); |
650 assertEquals("pt_PT should fall back to pt", "1 mil", result); | 650 assertEquals("pt_PT should fall back to pt", "1 mil", result); |
651 } | 651 } |
| 652 |
| 653 @Test |
| 654 public void TestBug12181() { |
| 655 ULocale loc = ULocale.ENGLISH; |
| 656 CompactDecimalFormat cdf = CompactDecimalFormat.getInstance(loc, Compact
Style.SHORT); |
| 657 String s = cdf.format(-1500); |
| 658 assertEquals("Should work with negative numbers", "-1.5K", s); |
| 659 } |
652 } | 660 } |
LEFT | RIGHT |