commit | e77fd12ec4166af21d9c5d9e9e00a6f41955c1af | [log] [tgz] |
---|---|---|
author | jat@google.com <jat@google.com@8db76d5a-ed1c-0410-87a9-c151d255dfc7> | Wed Dec 24 06:33:36 2008 +0000 |
committer | jat@google.com <jat@google.com@8db76d5a-ed1c-0410-87a9-c151d255dfc7> | Wed Dec 24 06:33:36 2008 +0000 |
tree | 7b8985274f99c2e5bf3664a2495cdb19cd863132 | |
parent | b4c03e297327dcdaa24661b5bf6f881d4aaba276 [diff] |
Add test for percent. Patch by: jat Review by: amitmanjhi (TBR) git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@4370 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/test/com/google/gwt/i18n/client/NumberFormat_en_Test.java b/user/test/com/google/gwt/i18n/client/NumberFormat_en_Test.java index 2eac1e6..66050e9 100644 --- a/user/test/com/google/gwt/i18n/client/NumberFormat_en_Test.java +++ b/user/test/com/google/gwt/i18n/client/NumberFormat_en_Test.java
@@ -267,6 +267,17 @@ assertEquals("-1,014.34 X", str); } + public void testPercent() { + String str; + + str = NumberFormat.getFormat("###.###%").format(0.4857); + assertEquals("48.57%", str); + str = NumberFormat.getFormat("###.### %").format(0.4857); + assertEquals("48.57 %", str); + str = NumberFormat.getFormat("0.00%").format(0.485); + assertEquals("48.50%", str); + } + public void testPerMill() { String str;