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