Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3740)

Delta Between Two Patch Sets: icu4j/main/tests/core/src/com/ibm/icu/dev/data/numberformattestspecification.txt

Issue 315420043: DecimalFormat rewrite, Java Base URL: svn+icussh://source.icu-project.org/repos/icu/branches/shane/numberformat/
Left Patch Set: Fixed most unit test failures. Overhauled parser to support custom affixes with currency. Added a f… Created 7 years, 1 month ago
Right Patch Set: r39857: Last commit before merge to trunk. Created 7 years ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
1 // Copyright (C) 2016 and later: Unicode, Inc. and others. 1 // Copyright (C) 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html 2 // License & terms of use: http://www.unicode.org/copyright.html
3 // Copyright (C) 2015-2016, International Business Machines 3 // Copyright (C) 2015-2016, International Business Machines
4 // Corporation and others. All Rights Reserved. 4 // Corporation and others. All Rights Reserved.
5 // 5 //
6 // This file is divided into test suites separated by whitespace. Each test 6 // This file is divided into test suites separated by whitespace. Each test
7 // suite starts with the name of the test followed by global field settings 7 // suite starts with the name of the test followed by global field settings
8 // for that test suite. After the global settings, comes "begin", the 8 // for that test suite. After the global settings, comes "begin", the
9 // per-test field names, and finally the test specific field values, 1 test 9 // per-test field names, and finally the test specific field values, 1 test
10 // per line. 10 // per line.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 12345 2345.000 54 12345 2345.000
55 72.1234 72.1234 55 72.1234 72.1234
56 56
57 test patterns with no '0' symbols 57 test patterns with no '0' symbols
58 set locale en_US 58 set locale en_US
59 begin 59 begin
60 pattern format output breaks 60 pattern format output breaks
61 # 514.23 514 61 # 514.23 514
62 # 0.23 0 62 # 0.23 0
63 # 0 0 63 # 0 0
64 # 1 1
64 ##.# 514.23 514.2 65 ##.# 514.23 514.2
65 ##.# 0.23 0.2 66 ##.# 0.23 0.2
66 ##.# 0 0 67 ##.# 0 0
68 ##.# 1 1
67 #.# 514.23 514.2 69 #.# 514.23 514.2
68 #.# 0.23 0.2 70 #.# 0.23 0.2
69 #.# 0 0 71 #.# 0 0
72 #.# 1 1
70 .# 514.23 514.2 73 .# 514.23 514.2
71 .# 0.23 .2 74 .# 0.23 .2
72 .# 0 .0 75 .# 0 .0
76 .# 1 1.0
73 #. 514.23 514. 77 #. 514.23 514.
74 #. 0.23 0. 78 #. 0.23 0.
75 #. 0 0. 79 #. 0 0.
80 #. 1 1.
76 . 514.23 514. 81 . 514.23 514.
77 . 0.23 0. 82 . 0.23 0.
78 . 0 0. 83 . 0 0.
84 . 1 1.
85
86 test behavior on numbers approaching zero
87 set locale en
88 begin
89 pattern format output breaks
90 #.## 0.01 0.01
91 #.## 0.001 0
92 #.## 0 0
93 #.00 0.01 .01
94 #.00 0.001 .00
95 #.00 0 .00
96 0.00 0.01 0.01
97 0.00 0.001 0.00
98 0.00 0 0.00
79 99
80 // Not in official spec, but needed for backwards compatibility 100 // Not in official spec, but needed for backwards compatibility
81 test patterns with leading grouping separator 101 test patterns with leading grouping separator
82 set locale en_US 102 set locale en_US
83 begin 103 begin
84 pattern format output breaks 104 pattern format output breaks
85 ,##0 1234.56 1,235 105 ,##0 1234.56 1,235
86 '#',## 3456 #34,56 106 '#',## 3456 #34,56
87 107
88 test patterns with valid and invalid quote marks 108 test patterns with valid and invalid quote marks
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // JDK gives 12,345E3. JDK seems to include the hashes in significant digits 175 // JDK gives 12,345E3. JDK seems to include the hashes in significant digits
156 ##0.00E0 12345 12,3E3 K 176 ##0.00E0 12345 12,3E3 K
157 // JDK gives 12,3001E3 177 // JDK gives 12,3001E3
158 ##0.0000E0 12300.1 12,300E3 K 178 ##0.0000E0 12300.1 12,300E3 K
159 // JDK gives 12,3001E3 179 // JDK gives 12,3001E3
160 ##0.000#E0 12300.1 12,30E3 K 180 ##0.000#E0 12300.1 12,30E3 K
161 ##0.000#E0 12301 12,301E3 181 ##0.000#E0 12301 12,301E3
162 0.05E0 12301.2 1,25E4 JK 182 0.05E0 12301.2 1,25E4 JK
163 ##0.000#E0 0.17 170,0E-3 183 ##0.000#E0 0.17 170,0E-3
164 // JDK doesn't support significant digits in exponents 184 // JDK doesn't support significant digits in exponents
185 @@@E0 6.235 6,24E0 K
165 @@@E0 6235 6,24E3 K 186 @@@E0 6235 6,24E3 K
166 @@@#E0 6200 6,20E3 K 187 @@@#E0 6200 6,20E3 K
167 @@@#E0 6201 6,201E3 K 188 @@@#E0 6201 6,201E3 K
168 @@@#E0 6201.7 6,202E3 K 189 @@@#E0 6201.7 6,202E3 K
169 @@@#E00 6201.7 6,202E03 K 190 @@@#E00 6201.7 6,202E03 K
170 @@@#E+00 6201.7 6,202E+03 K 191 @@@#E+00 6201.7 6,202E+03 K
171 // If no zeros are specified, significant digits is fraction length plus 1 192 // If no zeros are specified, significant digits is fraction length plus 1
172 #.##E0 52413 5,24E4 193 #.##E0 52413 5,24E4
173 ###.##E0 52413 52,4E3 K 194 ###.##E0 52413 52,4E3 K
174 #E0 52413 5,2413E4 K 195 #E0 52413 5,2413E4 K
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 *x$####,##0 1234 xxx$1\u00a0234 K 251 *x$####,##0 1234 xxx$1\u00a0234 K
231 ####,##0*x$ 1234 1\u00a0234xxx$ K 252 ####,##0*x$ 1234 1\u00a0234xxx$ K
232 ####,##0$*x 1234 1\u00a0234$xxx K 253 ####,##0$*x 1234 1\u00a0234$xxx K
233 // JDK doesn't seem to handle suffixes correctly dropping the 'nx' entirely 254 // JDK doesn't seem to handle suffixes correctly dropping the 'nx' entirely
234 ####,##0$*x;ne#n -1234 ne1\u00a0234nx K 255 ####,##0$*x;ne#n -1234 ne1\u00a0234nx K
235 ####,##0$*x;n#'*' -1234 n1\u00a0234*xx K 256 ####,##0$*x;n#'*' -1234 n1\u00a0234*xx K
236 *y%4.2###### 4.33 yyyy%432,6 K 257 *y%4.2###### 4.33 yyyy%432,6 K
237 // In J ICU adds padding as if 'EUR' is only 2 chars (2 * 0xa4) 258 // In J ICU adds padding as if 'EUR' is only 2 chars (2 * 0xa4)
238 \u00a4\u00a4 **####0.00 433.0 EUR *433,00 JK 259 \u00a4\u00a4 **####0.00 433.0 EUR *433,00 JK
239 // In J ICU adds padding as if 'EUR' is only 2 chars (2 * 0xa4) 260 // In J ICU adds padding as if 'EUR' is only 2 chars (2 * 0xa4)
240 \u00a4\u00a4 **#######0»433.0» EUR *433,00» JK 261 \u00a4\u00a4 **#######0»433.0» EUR ****433» JK
241 262
242 test padding and currencies 263 test padding and currencies
243 begin 264 begin
244 locale currency pattern format output breaks 265 locale currency pattern format output breaks
245 // In J, JPY is considered 2 char (2 * 0xa4) even though padding is done 266 // In J, JPY is considered 2 char (2 * 0xa4) even though padding is done
246 // after prefix. In C this test works. 267 // after prefix. In C this test works.
247 fr JPY \u00a4\u00a4 **#######0 433.22 JPY ****433 JK 268 fr JPY \u00a4\u00a4 **#######0 433.22 JPY ****433 JK
248 // JDK doesn't correct rounding for currency, shows USD (433 269 // JDK doesn't correct rounding for currency, shows USD (433
249 en USD \u00a4\u00a4 **#######0;\u00a4\u00a4 (#) -433.22 USD (433 .22) K 270 en USD \u00a4\u00a4 **#######0;\u00a4\u00a4 (#) -433.22 USD (433 .22) K
250 271
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 0 0 .567 321 0 0 .567
301 0 3 234.567 322 0 3 234.567
302 5 5 01,234.567 323 5 5 01,234.567
303 324
304 test min max fraction digits scientific 325 test min max fraction digits scientific
305 set locale en 326 set locale en
306 set pattern #E0 327 set pattern #E0
307 set format 299792458.0 328 set format 299792458.0
308 begin 329 begin
309 minIntegerDigits maxIntegerDigits minFractionDigits maxFract ionDigits output breaks 330 minIntegerDigits maxIntegerDigits minFractionDigits maxFract ionDigits output breaks
331 // JDK gives 2.99792458E8 (maxInt + maxFrac instead of minInt + maxFrac)
332 1 1000 0 5 2.99792E8 K
310 // JDK gives .3E9 instead of unlimited precision. 333 // JDK gives .3E9 instead of unlimited precision.
311 0 1 0 0 2.99792458E8 K 334 0 1 0 0 2.99792458E8 K
312 1 1 0 0 3E8 335 1 1 0 0 3E8
313 // JDK gives E0 instead of allowing for unlimited precision 336 // JDK gives E0 instead of allowing for unlimited precision
314 // S obeys the maximum integer digits and returns .299792458E9 337 // S obeys the maximum integer digits and returns .299792458E9
315 0 0 0 0 2.99792458E8 KS 338 0 0 0 0 2.99792458E8 KS
316 // JDK gives .299792E9 339 // JDK and S give .299792E9
317 0» 1» 0» 5» 2.9979E8» K 340 0» 1» 0» 5» 2.9979E8» KS
318 // JDK gives 300E6······ 341 // JDK gives 300E6······
319 0 3 0 0 299.792458E6 K 342 0 3 0 0 299.792458E6 K
320 // JDK gives 299.8E6 (maybe maxInt + maxFrac instead of minInt + maxFrac)? 343 // JDK gives 299.8E6 (maybe maxInt + maxFrac instead of minInt + maxFrac)?
321 0 3 0 1 300E6 K 344 0 3 0 1 300E6 K
322 // JDK gives 299.7925E6 345 // JDK gives 299.7925E6
323 2 3 0 4 299.792E6 K 346 2 3 0 4 299.792E6 K
324 // JDK gives 299.79246E6 347 // JDK gives 299.79246E6
325 2 3 0 5 299.7925E6 K 348 2 3 0 5 299.7925E6 K
326 3 3 0 5 299.79246E6 349 3 3 0 5 299.79246E6
327 3 3 0 4 299.7925E6 350 3 3 0 4 299.7925E6
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 0 1 0 0 2.9979245E7 K 395 0 1 0 0 2.9979245E7 K
373 // JDK gives 2998E4. 396 // JDK gives 2998E4.
374 0 4 0 0 2997.9245E4 K 397 0 4 0 0 2997.9245E4 K
375 398
376 test ticket 11524 399 test ticket 11524
377 set locale en 400 set locale en
378 set pattern #,##0.### 401 set pattern #,##0.###
379 begin 402 begin
380 format maxIntegerDigits output breaks 403 format maxIntegerDigits output breaks
381 123 1 3······· 404 123 1 3·······
382 0» 0» .0» CJK 405 0» 0» 0
383 // S ignores max integer if it is less than zero and prints "123" 406 // S ignores max integer if it is less than zero and prints "123"
384 123 -2147483648 0 S 407 123 -2147483648 0 S
385 12345 1 5······· 408 12345 1 5·······
386 12345 -2147483648 0 S 409 12345 -2147483648 0 S
387 5.3 1 5.3····· 410 5.3 1 5.3·····
388 5.3 -2147483648 .3 S 411 5.3 -2147483648 .3 S
389 412
390 test patterns with zero 413 test patterns with zero
391 set locale en 414 set locale en
392 set format 0 415 set format 0
393 begin 416 begin
394 pattern output breaks 417 pattern output breaks
395 #.# 0 418 #.# 0
396 #. 0. 419 #. 0.
397 .# .0 420 .# .0
398 # 0 421 # 0
422 #,##0.00 0.00
423 #,###.00 .00
399 00.000E00 00.000E00 424 00.000E00 00.000E00
400 0.####E0 0E0 425 0.####E0 0E0
401 ##0.######E000 0E000 426 ##0.######E000 0E000
402 427
403 test significant digits manually set 428 test significant digits manually set
404 set locale en_US 429 set locale en_US
405 set pattern 0.0 430 set pattern 0.0
406 set useSigDigits 1 431 set useSigDigits 1
407 set minSigDigits 3 432 set minSigDigits 3
408 set maxSigDigits 5 433 set maxSigDigits 5
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 1.26 halfDown 1.5 K 524 1.26 halfDown 1.5 K
500 1.25 halfEven 1 K 525 1.25 halfEven 1 K
501 -1.01 up -1.5 K 526 -1.01 up -1.5 K
502 -1.49 down -1 K 527 -1.49 down -1 K
503 1.01 up 1.5 K 528 1.01 up 1.5 K
504 1.49 down 1 K 529 1.49 down 1 K
505 -1.01 ceiling -1 530 -1.01 ceiling -1
506 -1.49 floor -1.5 531 -1.49 floor -1.5
507 532
508 test currency usage setters 533 test currency usage setters
509 // TODO: Find a country and currency where standard and cash differ
510 set locale CH 534 set locale CH
511 set currency CHF
512 set pattern \u00a4\u00a4 0 535 set pattern \u00a4\u00a4 0
513 begin 536 begin
514 format» currencyUsage» output» breaks 537 format» currency» currencyUsage» output» breaks
515 0.37» standard» CHF 0.37» K 538 0.37» CHF» standard» CHF 0.37» K
516 // TODO: Get the rounding data into ICU4C and ICU4J 539 0.37» CHF» cash» CHF 0.35» CK
517 // Update (January 2017): this passes ICU4J 540 1.234» CZK» standard» CZK 1.23» K
518 0.37» cash» CHF 0.35» CK 541 1.234» CZK» cash» CZK 1
542
543 test currency usage to pattern
544 set locale en
545 begin
546 currency» currencyUsage» toPattern» breaks
547 // These work in J, but it prepends an extra hash sign to the pattern.
548 // K does not support this feature.
549 USD» standard» 0.00» JK
550 CHF» standard» 0.00» JK
551 CZK» standard» 0.00» JK
552 USD» cash» 0.00» JK
553 CHF» cash» 0.05» JK
554 CZK» cash» 0» JK
519 555
520 test currency rounding 556 test currency rounding
521 set locale en 557 set locale en
522 set currency USD 558 set currency USD
523 begin 559 begin
524 pattern format output breaks 560 pattern format output breaks
525 #» 123» 123 561 #» 123» 123» S
526 // Currency rounding should always override the pattern. 562 // Currency rounding should always override the pattern.
527 // K prints the currency in ISO format for some reason. 563 // K prints the currency in ISO format for some reason.
528 \u00a4# 123 $123.00 K 564 \u00a4# 123 $123.00 K
529 \u00a4#.000 123 $123.00 K 565 \u00a4#.000 123 $123.00 K
530 \u00a4#.## 123 $123.00 K 566 \u00a4#.## 123 $123.00 K
531 567
532 test exponent parameter setters 568 test exponent parameter setters
533 set locale en_US 569 set locale en_US
534 set pattern 0.##E0 570 set pattern 0.##E0
535 set format 299792458 571 set format 299792458
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 // documentation says localizedPattern is not supported, change to pattern 664 // documentation says localizedPattern is not supported, change to pattern
629 locale pattern format output breaks 665 locale pattern format output breaks
630 en #0% 0.4376 44% 666 en #0% 0.4376 44%
631 // This next test breaks JDK. JDK doesn't multiply by 100. 667 // This next test breaks JDK. JDK doesn't multiply by 100.
632 fa \u0025\u00a0\u0023\u0030 0.4376 \u200e\u066a\u00a0\u06f4\u06f4 K 668 fa \u0025\u00a0\u0023\u0030 0.4376 \u200e\u066a\u00a0\u06f4\u06f4 K
633 669
634 test toPattern 670 test toPattern
635 set locale en 671 set locale en
636 begin 672 begin
637 pattern toPattern breaks 673 pattern toPattern breaks
674 // All of the "S" failures in this section are because of functionally equivalen t patterns
638 // JDK doesn't support any patterns with padding or both negative prefix and suf fix 675 // JDK doesn't support any patterns with padding or both negative prefix and suf fix
639 // Breaks ICU4J See ticket 11671 676 // Breaks ICU4J See ticket 11671
640 // All of the "S" failures in this section are because of functionally equivalen t patterns
641 **0,000 **0,000 JK 677 **0,000 **0,000 JK
642 **##0,000 **##0,000 K 678 **##0,000 **##0,000 K
643 **###0,000 **###0,000 K 679 **###0,000 **###0,000 K
644 **####0,000 **#,##0,000 KS 680 **####0,000 **#,##0,000 KS
645 ###,000. #,000. 681 ###,000. #,000.
646 0,000 #0,000 S 682 0,000 #0,000 S
647 .00 #.00 683 .00 #.00
648 000 #000 S 684 000 #000 S
649 000,000 #,000,000 S 685 000,000 #,000,000 S
650 pp#,000 pp#,000 686 pp#,000 pp#,000
651 00.## #00.## S 687 00.## #00.## S
652 #,#00.025 #,#00.025 688 #,#00.025 #,#00.025
653 // No secondary grouping in JDK 689 // No secondary grouping in JDK
654 #,##,###.02500» #,##,###.02500» KS 690 #,##,###.02500» #,##,###.02500» K
655 pp#,000;(#) pp#,000;(#,000) K 691 pp#,000;(#) pp#,000;(#,000) K
656 **####,##,##0.0##;(#) **#,##,##,##0.0##;**(##,##,##0.0##) KS 692 **####,##,##0.0##;(#) **#,##,##,##0.0##;**(##,##,##0.0##) KS
657 // No significant digits in JDK 693 // No significant digits in JDK
658 @@### @@### K 694 @@### @@### K
659 @,@#,### @,@#,### K 695 @,@#,### @,@#,### K
660 0.00E0 0.00E0 696 0.00E0 0.00E0
661 // The following one works in JDK, probably because 697 // The following one works in JDK, probably because
662 // it just returns the same string 698 // it just returns the same string
663 @@@##E0 @@@##E0 699 @@@##E0 @@@##E0
664 ###0.00#E0 ###0.00#E0 700 ###0.00#E0 ###0.00#E0
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 // In general the grouping separators have to match their expected 830 // In general the grouping separators have to match their expected
795 // location exactly. The only exception is when string being parsed 831 // location exactly. The only exception is when string being parsed
796 // have no separators at all. 832 // have no separators at all.
797 +12,345.67 12345.67 833 +12,345.67 12345.67
798 // JDK doesn't require separators to be in the right place. 834 // JDK doesn't require separators to be in the right place.
799 +1,23,4567.8901 fail K 835 +1,23,4567.8901 fail K
800 +1,234,567.8901 fail K 836 +1,234,567.8901 fail K
801 +1234,567.8901 fail K 837 +1234,567.8901 fail K
802 +1,234567.8901 fail K 838 +1,234567.8901 fail K
803 +1234567.8901 1234567.8901 839 +1234567.8901 1234567.8901
804 // Minimum grouping is not satisfied below. 840 // Minimum grouping is not satisfied below, but that's ok
805 // ICU58 does not check for this. 841 // because minimum grouping is optional.
806 +1,234.5» fail» JK 842 +1,234.5» 1234.5
807 // Comma after decimal means parse to a comma 843 // Comma after decimal means parse to a comma
808 +1,23,456.78,9 123456.78 844 +1,23,456.78,9 123456.78
809 // J fails upon seeing the second decimal point 845 // J fails upon seeing the second decimal point
810 +1,23,456.78.9 123456.78 J 846 +1,23,456.78.9 123456.78 J
811 +79 79 847 +79 79
812 +79 79 848 +79 79
813 + 79 fail 849 + 79 fail
814 // JDK parses as -1945 850 // JDK parses as -1945
815 (1,945d1) fail K 851 (1,945d1) fail K
816 852
817 test parse strict without prefix/suffix 853 test parse strict without prefix/suffix
818 set locale en 854 set locale en
819 set pattern # 855 set pattern #
820 set lenient 0 856 set lenient 0
821 begin 857 begin
822 parse output breaks 858 parse output breaks
823 12.34 12.34 859 12.34 12.34
824 -12.34 -12.34 860 -12.34 -12.34
825 +12.34» fail 861 +12.34» 12.34» JK
826 $12.34 fail 862 $12.34 fail
827 863
828 test parse integer only 864 test parse integer only
829 set locale en 865 set locale en
830 set pattern 0.00 866 set pattern 0.00
831 set parseIntegerOnly 1 867 set parseIntegerOnly 1
832 begin 868 begin
833 parse output breaks 869 parse output breaks
834 35 35 870 35 35
835 // S accepts leading plus signs 871 // S accepts leading plus signs
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 946
911 test parse with locale symbols 947 test parse with locale symbols
912 // The grouping separator in it_CH is an apostrophe 948 // The grouping separator in it_CH is an apostrophe
913 set locale it_CH 949 set locale it_CH
914 set pattern # 950 set pattern #
915 begin 951 begin
916 parse output breaks 952 parse output breaks
917 १३ 13······ 953 १३ 13······
918 १३.३१‍ 13.31··· 954 १३.३१‍ 13.31···
919 // J and K stop parsing at the apostrophe 955 // J and K stop parsing at the apostrophe
920 123'4» 1234» JK 956 123'456»123456» JK
921 524'1.3 5241.3 JK 957 524'1.3 5241.3 JK
922 ३'१‍ 31 JK 958 ३'१‍ 31 JK
923 959
924 test parse with European-style comma/period 960 test parse with European-style comma/period
925 set locale pt 961 set locale pt
926 set pattern # 962 set pattern #
927 begin 963 begin
928 parse output breaks 964 parse output breaks
929 // J and K get 123 965 // J and K get 123
930 123.45» 12345» JK 966 123.456»123456» JK
931 123,45» 123.45 967 123,456»123.456
932 987,654.321 987.654 968 987,654.321 987.654
933 987,654 321 987.654 969 987,654 321 987.654
934 // J and K get 987 970 // J and K get 987
935 987.654,321 987654.321 JK 971 987.654,321 987654.321 JK
936 972
937 test select 973 test select
938 set locale sr 974 set locale sr
939 begin 975 begin
940 format pattern plural 976 format pattern plural
941 Inf 0 other 977 Inf 0 other
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 53.45 US Dollars 53.45 USD 1175 53.45 US Dollars 53.45 USD
1140 US Dollar 53.45 53.45 USD J 1176 US Dollar 53.45 53.45 USD J
1141 53.45 US Dollar 53.45 USD 1177 53.45 US Dollar 53.45 USD
1142 US Dollars53.45 53.45 USD 1178 US Dollars53.45 53.45 USD
1143 53.45US Dollars 53.45 USD CJ 1179 53.45US Dollars 53.45 USD CJ
1144 US Dollar53.45 53.45 USD 1180 US Dollar53.45 53.45 USD
1145 53.45US Dollar 53.45 USD CJ 1181 53.45US Dollar 53.45 USD CJ
1146 1182
1147 test format foreign currency 1183 test format foreign currency
1148 set locale fa_IR 1184 set locale fa_IR
1185 set currency IRR
1149 begin 1186 begin
1150 pattern format output breaks 1187 pattern format output breaks
1151 \u00a4\u00a4\u00a4 0.00;\u00a4\u00a4\u00a4 # 1235 \u0631\u06cc\u0627\u0644 \u0627\u06cc\u0631\u0627\u0646 \u06F1\u06F2\u06F3\u06F5 K 1188 \u00a4\u00a4\u00a4 0.00;\u00a4\u00a4\u00a4 # 1235 \u0631\u06cc\u0627\u0644 \u0627\u06cc\u0631\u0627\u0646 \u06F1\u06F2\u06F3\u06F5 K
1152 \u00a4\u00a4 0.00;\u00a4\u00a4 -# 1235 IRR \u06F1\u06F2\u06F3\u06F5 K 1189 \u00a4\u00a4 0.00;\u00a4\u00a4 -# 1235 IRR \u06F1\u06F2\u06F3\u06F5 K
1153 \u00a4 0.00;\u00a4 -# 1235 \u0631\u06cc\u0627\u0644 \u06F1\u06F2\u06F3\u06F 5 K 1190 \u00a4 0.00;\u00a4 -# 1235 \u0631\u06cc\u0627\u0644 \u06F1\u06F2\u06F3\u06F 5 K
1154 1191
1155 test parse foreign currency symbol 1192 test parse foreign currency symbol
1156 set pattern \u00a4 0.00;\u00a4 -# 1193 set pattern \u00a4 0.00;\u00a4 -#
1157 set locale fa_IR 1194 set locale fa_IR
1158 begin 1195 begin
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 1316
1280 test ticket 10436 1317 test ticket 10436
1281 set locale en 1318 set locale en
1282 set roundingMode ceiling 1319 set roundingMode ceiling
1283 set minFractionDigits 0 1320 set minFractionDigits 0
1284 set maxFractionDigits 0 1321 set maxFractionDigits 0
1285 begin 1322 begin
1286 format output breaks 1323 format output breaks
1287 -0.99 -0 JK 1324 -0.99 -0 JK
1288 1325
1326 test parse decimalPatternMatchRequired
1327 set locale en
1328 set decimalPatternMatchRequired 1
1329 begin
1330 pattern parse output breaks
1331 // K doesn't support this feature.
1332 0 123 123
1333 0 123. fail JK
1334 0 1.23 fail JK
1335 0 -513 -513
1336 0 -513. fail JK
1337 0 -5.13 fail JK
1338 0.0 123 fail K
1339 0.0 123. 123
1340 0.0 1.23 1.23
1341 0.0 -513 fail K
1342 0.0 -513. -513
1343 0.0 -5.13 -5.13
1344
1345 test parse minus sign
1346 set locale en
1347 set pattern #
1348 begin
1349 parse output breaks
1350 -123 -123
1351 - 123 -123 JK
1352 -123 -123 JK
1353 - 123 -123 JK
1354 123- -123 JK
1355 123 - -123 JK
1356
1289 test parse case sensitive 1357 test parse case sensitive
1290 set locale en 1358 set locale en
1291 set lenient 1 1359 set lenient 1
1292 set pattern Aa# 1360 set pattern Aa#
1293 begin 1361 begin
1294 parse parseCaseSensitive output breaks 1362 parse parseCaseSensitive output breaks
1295 Aa1.23 1 1.23 1363 Aa1.23 1 1.23
1296 Aa1.23 0 1.23 1364 Aa1.23 0 1.23
1297 AA1.23 1 fail 1365 AA1.23 1 fail
1298 // J and K do not support case-insensitive parsing for prefix/suffix. 1366 // J and K do not support case-insensitive parsing for prefix/suffix.
1299 // J supports it for the exponent separator, but not K. 1367 // J supports it for the exponent separator, but not K.
1300 AA1.23 0 1.23 JK 1368 AA1.23 0 1.23 JK
1301 aa1.23 1 fail 1369 aa1.23 1 fail
1302 aa1.23 0 1.23 JK 1370 aa1.23 0 1.23 JK
1303 Aa1.23E3 1 1230 1371 Aa1.23E3 1 1230
1304 Aa1.23E3 0 1230 1372 Aa1.23E3 0 1230
1305 Aa1.23e3 1 1.23 J 1373 Aa1.23e3 1 1.23 J
1306 Aa1.23e3 0 1230 K 1374 Aa1.23e3 0 1230 K
1307 NaN 1 NaN K 1375 NaN 1 NaN K
1308 NaN 0 NaN K 1376 NaN 0 NaN K
1309 nan 1 fail 1377 nan 1 fail
1310 nan 0 NaN JK 1378 nan 0 NaN JK
1311 1379
1312 test parse infinity, nan, and scientific notation overflow 1380 test parse infinity and scientific notation overflow
1313 set locale en 1381 set locale en
1314 begin 1382 begin
1315 parse output breaks 1383 parse output breaks
1316 NaN NaN K 1384 NaN NaN K
1317 1E999999999999999» Inf 1385 // JDK returns zero
1318 -1E999999999999999» -Inf 1386 1E999999999999999» Inf» K
1319 1E-99999999999999» 0 1387 -1E999999999999999» -Inf» K
1388 1E-99999999999999» 0.0
1389 // Note: The test suite code doesn't properly check for 0.0 vs. -0.0
1390 -1E-99999999999999» -0.0
1391 1E2147483648» Inf» K
1392 1E2147483647» Inf» K
1393 1E2147483646» 1E2147483646
1394 1E-2147483649» 0
1395 1E-2147483648» 0
1396 // S returns zero here
1397 1E-2147483647» 1E-2147483647» S
1398 1E-2147483646» 1E-2147483646
1320 1399
1321 test format push limits 1400 test format push limits
1322 set locale en 1401 set locale en
1323 set minFractionDigits 2 1402 set minFractionDigits 2
1324 set roundingMode halfDown 1403 set roundingMode halfDown
1325 begin 1404 begin
1326 maxFractionDigits format output breaks 1405 maxFractionDigits format output breaks
1327 100» 987654321987654321» 987654321987654321.00» K 1406 100» 987654321987654321» 987654321987654321.00
1328 100» 987654321.987654321» 987654321.987654321» K 1407 100» 987654321.987654321» 987654321.987654321
1329 100» 9999999999999.9950000000001» 9999999999999.9950000000001» K 1408 100» 9999999999999.9950000000001» 9999999999999.9950000000001
1330 2» 9999999999999.9950000000001» 10000000000000.00» K 1409 2» 9999999999999.9950000000001» 10000000000000.00
1331 2» 9999999.995000001» 10000000.00 1410 2» 9999999.99499999» 9999999.99
1332 100» 56565656565656565656565656565656565656565656565656565656565656» 56565656 565656565656565656565656565656565656565656565656565656.00» K 1411 // K doesn't support halfDowm rounding mode?
1333 100» 454545454545454545454545454545.454545454545454545454545454545» 45454545 4545454545454545454545.454545454545454545454545454545» K 1412 2» 9999999.995» 9999999.99» K
1413 2» 9999999.99500001» 10000000.00
1414 100» 56565656565656565656565656565656565656565656565656565656565656» 56565656 565656565656565656565656565656565656565656565656565656.00
1415 100» 454545454545454545454545454545.454545454545454545454545454545» 45454545 4545454545454545454545.454545454545454545454545454545
1334 100 0.0000000000000000000123 0.0000000000000000000123 1416 100 0.0000000000000000000123 0.0000000000000000000123
1335 100» -78787878787878787878787878787878» -7878787878787878787878787878787 8.00» K 1417 100» -78787878787878787878787878787878» -7878787878787878787878787878787 8.00
1336 100» -8989898989898989898989.8989898989898989» -8989898989898989898989. 8989898989898989» K 1418 100» -8989898989898989898989.8989898989898989» -8989898989898989898989. 8989898989898989
1337 1419
1420 test ticket 11230
1421 set locale en
1422 set pattern ###
1423 begin
1424 parse» output» breaks
1425 // K and J return null; S returns 99
1426 9 9» 9» JKS
1427 // K and J return null
1428 9 999» 9999» JK
1429
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b