• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
10ref= "#.#"
11
12rt:  "0.###"  1.0         "1"
13
14# Basics
15fp:  "0.####" 0.10005     "0.1"        0.1
16fp:  -        0.10006     "0.1001"     0.1001
17pat: -        "#0.####"
18fp:  "#.####" 0.10005     "0.1"        0.1
19pat: -        "#0.####"
20
21rt:  "0"      1234        "1234"
22pat: -        "#0"
23
24# Significant digits
25fp:  "@@@"    1.234567    "1.23"       1.23
26fp:  -        1234567     "1230000"    1230000
27fp:  -        0.012345    "0.0123"     0.0123
28pat: -        -
29fp:  "#,@@@"  1234567     "1,230,000"  1230000
30pat: -        "#,@@@"
31rt:  "@@@@"   0.0012      "0.001200"
32fp:  -        0.99999     "1.000"      1
33pat: -        -
34rt:  "@###"   0.00123     "0.00123"
35rt:  -        123000      "123000"
36fp:  -        123456      "123500"     123500
37fp:  -        12.3456     "12.35"      12.35
38fp:  -        0.0123456   "0.01235"    0.01235
39pat: -        -
40fp:  "@,###"  27182       "27,180"     27180
41rt:  -        123000      "123,000"
42fp:  -        0.99999     "1"          1
43rt:  -        0.9999      "0.9999"
44pat: -        -
45rt:  "@##E0"  20000       "2E4"
46rt:  -        27000       "2.7E4"
47rt:  -        27100       "2.71E4"
48fp:  -        27182       "2.72E4"     27200
49pat: -        -
50rt:  "@@@E0"  20000       "2.00E4"
51rt:  -        27000       "2.70E4"
52rt:  -        27100       "2.71E4"
53fp:  -        27182       "2.72E4"     27200
54pat: -        -
55fp:  "#,@@##" 314156      "31,4200"    314200
56rt:  -        3           "3.0"
57rt:  -        5000        "5000"
58rt:  -        0.005       "0.0050"
59pat: -        -
60fp:  "@@@@@@" 123456.7    "123457"     123457
61pat: -        -
62
63pat: "##,@@##" "#,@@##"
64pat: "##@@##"  "@@##"
65
66pat: "@@.@@"  err  # decimal sep. disallowed in sig. digits
67pat: "@#@"    err  # only one cluster of sig. digits
68pat: "@@0"    err  # either @ or 0, not both
69
70# NumberRegression/Test4140009
71rt:  ""       123.456     "123.456"
72rt:  ""       -123.456    "-123.456"
73
74# Currency
75fpc: "en_US"        1234.56/USD  "$1,234.56"    1234.56/USD
76fpc: -              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
80fpc: -              123/GTQ      "GTQ123.00"      123/GTQ
81
82# Google Patch.  INR formats as "Rs.", not as "Rs"
83fpc: -              1/INR        "Rs.1.00"      1/INR
84fpc: -              2/INR        "Rs.2.00"      2/INR
85
86# Display names with shared prefix (YDD vs. Y)
87fpc: -              100/YDD      "YDD100.00"    100/YDD
88fpc: -              100/CNY      "CN\u00a5100.00"      100/CNY
89
90# Regression Tests bug#7914
91p: "#E00" "12E12" "12000000000000"
92p: "#####" "12E12" "12000000000000"
93