2016-07-01 16:59:16 +00:00
|
|
|
|
# Copyright (C) 2016 and later: Unicode, Inc. and others.
|
2016-06-15 18:58:17 +00:00
|
|
|
|
# License & terms of use: http://www.unicode.org/copyright.html
|
|
|
|
|
######################################################################
|
2016-05-31 21:45:07 +00:00
|
|
|
|
# Copyright (c) 2004-2011 International Business Machines
|
|
|
|
|
# Corporation and others. All Rights Reserved.
|
2004-03-25 02:22:11 +00:00
|
|
|
|
######################################################################
|
|
|
|
|
# Author: Alan Liu
|
|
|
|
|
# Created: March 15 2004
|
|
|
|
|
# Since: ICU 3.0
|
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
|
|
ref= "#.#"
|
|
|
|
|
|
|
|
|
|
rt: "0.###" 1.0 "1"
|
|
|
|
|
|
|
|
|
|
# Basics
|
|
|
|
|
fp: "0.####" 0.10005 "0.1" 0.1
|
|
|
|
|
fp: - 0.10006 "0.1001" 0.1001
|
2018-03-31 05:18:51 +00:00
|
|
|
|
pat: - "0.####"
|
2004-03-25 02:22:11 +00:00
|
|
|
|
fp: "#.####" 0.10005 "0.1" 0.1
|
2018-03-31 05:18:51 +00:00
|
|
|
|
pat: - "0.####"
|
2004-03-25 02:22:11 +00:00
|
|
|
|
|
|
|
|
|
rt: "0" 1234 "1234"
|
2018-03-31 05:18:51 +00:00
|
|
|
|
pat: - "0"
|
2004-03-25 02:22:11 +00:00
|
|
|
|
|
|
|
|
|
# Significant digits
|
|
|
|
|
fp: "@@@" 1.234567 "1.23" 1.23
|
|
|
|
|
fp: - 1234567 "1230000" 1230000
|
|
|
|
|
fp: - 0.012345 "0.0123" 0.0123
|
|
|
|
|
pat: - -
|
|
|
|
|
fp: "#,@@@" 1234567 "1,230,000" 1230000
|
|
|
|
|
pat: - "#,@@@"
|
|
|
|
|
rt: "@@@@" 0.0012 "0.001200"
|
|
|
|
|
fp: - 0.99999 "1.000" 1
|
|
|
|
|
pat: - -
|
|
|
|
|
rt: "@###" 0.00123 "0.00123"
|
|
|
|
|
rt: - 123000 "123000"
|
|
|
|
|
fp: - 123456 "123500" 123500
|
|
|
|
|
fp: - 12.3456 "12.35" 12.35
|
|
|
|
|
fp: - 0.0123456 "0.01235" 0.01235
|
|
|
|
|
pat: - -
|
|
|
|
|
fp: "@,###" 27182 "27,180" 27180
|
|
|
|
|
rt: - 123000 "123,000"
|
|
|
|
|
fp: - 0.99999 "1" 1
|
|
|
|
|
rt: - 0.9999 "0.9999"
|
|
|
|
|
pat: - -
|
|
|
|
|
rt: "@##E0" 20000 "2E4"
|
|
|
|
|
rt: - 27000 "2.7E4"
|
|
|
|
|
rt: - 27100 "2.71E4"
|
|
|
|
|
fp: - 27182 "2.72E4" 27200
|
|
|
|
|
pat: - -
|
|
|
|
|
rt: "@@@E0" 20000 "2.00E4"
|
|
|
|
|
rt: - 27000 "2.70E4"
|
|
|
|
|
rt: - 27100 "2.71E4"
|
|
|
|
|
fp: - 27182 "2.72E4" 27200
|
|
|
|
|
pat: - -
|
|
|
|
|
fp: "#,@@##" 314156 "31,4200" 314200
|
|
|
|
|
rt: - 3 "3.0"
|
|
|
|
|
rt: - 5000 "5000"
|
|
|
|
|
rt: - 0.005 "0.0050"
|
|
|
|
|
pat: - -
|
2004-04-12 23:38:12 +00:00
|
|
|
|
fp: "@@@@@@" 123456.7 "123457" 123457
|
|
|
|
|
pat: - -
|
2004-03-25 02:22:11 +00:00
|
|
|
|
|
|
|
|
|
pat: "##,@@##" "#,@@##"
|
|
|
|
|
pat: "##@@##" "@@##"
|
|
|
|
|
|
|
|
|
|
pat: "@@.@@" err # decimal sep. disallowed in sig. digits
|
|
|
|
|
pat: "@#@" err # only one cluster of sig. digits
|
|
|
|
|
pat: "@@0" err # either @ or 0, not both
|
|
|
|
|
|
|
|
|
|
# NumberRegression/Test4140009
|
|
|
|
|
rt: "" 123.456 "123.456"
|
|
|
|
|
rt: "" -123.456 "-123.456"
|
2004-04-15 06:20:42 +00:00
|
|
|
|
|
|
|
|
|
# Currency
|
2004-04-21 18:05:06 +00:00
|
|
|
|
fpc: "en_US" 1234.56/USD "$1,234.56" 1234.56/USD
|
|
|
|
|
fpc: - 1234.56/JPY "\u00A51,235" 1235/JPY
|
2004-04-15 06:20:42 +00:00
|
|
|
|
# ISO codes that overlap display names (QQQ vs. Q)
|
2009-02-28 02:07:55 +00:00
|
|
|
|
# recognize real ISO name in parsing, so, can not use fake name as QQQ
|
|
|
|
|
#fpc: - 123/QQQ "QQQ123.00" 123/QQQ # QQQ is fake
|
2018-03-31 05:18:51 +00:00
|
|
|
|
fpc: - 123/GTQ "GTQ 123.00" 123/GTQ
|
2004-04-15 06:20:42 +00:00
|
|
|
|
# ChoiceFormat-based display names
|
2011-03-12 14:57:18 +00:00
|
|
|
|
fpc: - 1/INR "\u20b91.00" 1/INR
|
|
|
|
|
fpc: - 2/INR "\u20b92.00" 2/INR
|
2004-04-15 06:20:42 +00:00
|
|
|
|
# Display names with shared prefix (YDD vs. Y)
|
2018-03-31 05:18:51 +00:00
|
|
|
|
fpc: - 100/YDD "YDD 100.00" 100/YDD
|
2009-03-13 03:21:29 +00:00
|
|
|
|
fpc: - 100/CNY "CN\u00a5100.00" 100/CNY
|
2010-08-31 00:25:19 +00:00
|
|
|
|
|
|
|
|
|
# Regression Tests bug#7914
|
|
|
|
|
p: "#E00" "12E12" "12000000000000"
|
|
|
|
|
p: "#####" "12E12" "12000000000000"
|