1 ###################################################################### 2 # Copyright (c) 2004-2011 International Business Machines 3 # Corporation and others. All Rights Reserved. 4 ###################################################################### 5 # Author: Alan Liu 6 # Created: March 15 2004 7 # Since: ICU 3.0 8 ###################################################################### 9 10 ref= "#.#" 11 12 rt: "0.###" 1.0 "1" 13 14 # Basics 15 fp: "0.####" 0.10005 "0.1" 0.1 16 fp: - 0.10006 "0.1001" 0.1001 17 pat: - "#0.####" 18 fp: "#.####" 0.10005 "0.1" 0.1 19 pat: - "#0.####" 20 21 rt: "0" 1234 "1234" 22 pat: - "#0" 23 24 # Significant digits 25 fp: "@@@" 1.234567 "1.23" 1.23 26 fp: - 1234567 "1230000" 1230000 27 fp: - 0.012345 "0.0123" 0.0123 28 pat: - - 29 fp: "#,@@@" 1234567 "1,230,000" 1230000 30 pat: - "#,@@@" 31 rt: "@@@@" 0.0012 "0.001200" 32 fp: - 0.99999 "1.000" 1 33 pat: - - 34 rt: "@###" 0.00123 "0.00123" 35 rt: - 123000 "123000" 36 fp: - 123456 "123500" 123500 37 fp: - 12.3456 "12.35" 12.35 38 fp: - 0.0123456 "0.01235" 0.01235 39 pat: - - 40 fp: "@,###" 27182 "27,180" 27180 41 rt: - 123000 "123,000" 42 fp: - 0.99999 "1" 1 43 rt: - 0.9999 "0.9999" 44 pat: - - 45 rt: "@##E0" 20000 "2E4" 46 rt: - 27000 "2.7E4" 47 rt: - 27100 "2.71E4" 48 fp: - 27182 "2.72E4" 27200 49 pat: - - 50 rt: "@@@E0" 20000 "2.00E4" 51 rt: - 27000 "2.70E4" 52 rt: - 27100 "2.71E4" 53 fp: - 27182 "2.72E4" 27200 54 pat: - - 55 fp: "#,@@##" 314156 "31,4200" 314200 56 rt: - 3 "3.0" 57 rt: - 5000 "5000" 58 rt: - 0.005 "0.0050" 59 pat: - - 60 fp: "@@@@@@" 123456.7 "123457" 123457 61 pat: - - 62 63 pat: "##,@@##" "#,@@##" 64 pat: "##@@##" "@@##" 65 66 pat: "@@.@@" err # decimal sep. disallowed in sig. digits 67 pat: "@#@" err # only one cluster of sig. digits 68 pat: "@@0" err # either @ or 0, not both 69 70 # NumberRegression/Test4140009 71 rt: "" 123.456 "123.456" 72 rt: "" -123.456 "-123.456" 73 74 # Currency 75 fpc: "en_US" 1234.56/USD "$1,234.56" 1234.56/USD 76 fpc: - 1234.56/JPY "\u00A51,235" 1235/JPY 77 # ISO codes that overlap display names (QQQ vs. Q) 78 # recognize real ISO name in parsing, so, can not use fake name as QQQ 79 #fpc: - 123/QQQ "QQQ123.00" 123/QQQ # QQQ is fake 80 fpc: - 123/GTQ "GTQ123.00" 123/GTQ 81 # ChoiceFormat-based display names 82 fpc: - 1/INR "\u20b91.00" 1/INR 83 fpc: - 2/INR "\u20b92.00" 2/INR 84 # Display names with shared prefix (YDD vs. Y) 85 fpc: - 100/YDD "YDD100.00" 100/YDD 86 fpc: - 100/CNY "CN\u00a5100.00" 100/CNY 87 88 # Regression Tests bug#7914 89 p: "#E00" "12E12" "12000000000000" 90 p: "#####" "12E12" "12000000000000" 91