]> gitweb.fperrin.net Git - Dictionary.git/blob - jars/icu4j-52_1/main/tests/core/src/com/ibm/icu/dev/test/format/NumberFormatTestCases.txt
Clean up imports.
[Dictionary.git] / jars / icu4j-52_1 / main / tests / core / src / com / ibm / icu / dev / test / format / NumberFormatTestCases.txt
1 ######################################################################
2 # Copyright (c) 2004, 2012 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  "¥1,235"  1235/JPY
77 # ISO codes that overlap display names (QQQ vs. Q)
78 # fake ISO code is not longer supported
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        "₹1.00"      1/INR
83
84 fpc: -              2/INR        "₹2.00"      2/INR
85 # Display names with shared prefix (YDD vs. Y)
86 fpc: -              100/YDD      "YDD100.00"    100/YDD
87 fpc: -              100/CNY      "CN¥100.00"      100/CNY
88
89 # Lenient Tests
90
91 loc= "en"
92 p: -              "1,234.56" 1234.56
93 p: -              "1'234.56" 1234.56
94 p: -              "1 234.56" 1234.56
95 p: -              "1٬234.56" 1234.56
96 p: -              "1,234.56" 1234.56
97 p: -              "1.234.56" 1.234
98 p: -              "1、234。56" 1234.56
99
100 loc= "fr"
101 p: -              "1.234,56" 1234.56
102 p: -              "1'234,56" 1234.56
103 p: -              "1 234,56" 1234.56
104 p: -              "1,234,56" 1.234
105 p: -              "1。234、56" 1234.56
106
107 loc= "ar"
108 p: -              "1234٫56" 1234.56
109 p: -              "1234،56" 1234.56
110 p: -              "1234،56" 1234.56
111 p: -              "1234,56" 1234.56
112 p: -              "1234,56" 1234.56
113 p: -              "1234,56" 1234.56
114
115 strict= true
116 loc= "en"
117 p: -              "1、234。56" 1
118 loc= "fr"
119 p: -              "1。234、56" 1
120 loc= "ar"
121 p: -              "1234،56" 1234
122 p: -              "1234،56" 1234