LEFT | RIGHT |
1 // ยฉ 2018 and later: Unicode, Inc. and others. | 1 // ยฉ 2018 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 | 3 |
4 #include "unicode/utypes.h" | 4 #include "unicode/utypes.h" |
5 | 5 |
6 #if !UCONFIG_NO_FORMATTING | 6 #if !UCONFIG_NO_FORMATTING |
7 | 7 |
8 #include "numbertest.h" | 8 #include "numbertest.h" |
9 #include "numparse_impl.h" | 9 #include "numparse_impl.h" |
10 #include "static_unicode_sets.h" | 10 #include "static_unicode_sets.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 {3, u"51423x", u"0", 5, 51423.}, | 41 {3, u"51423x", u"0", 5, 51423.}, |
42 {3, u" 51423", u"0", 6, 51423.}, | 42 {3, u" 51423", u"0", 6, 51423.}, |
43 {3, u"51423 ", u"0", 5, 51423.}, | 43 {3, u"51423 ", u"0", 5, 51423.}, |
44 {3, u"๐ฑ๐ญ๐ฐ๐ฎ๐ฏ", u"0", 10, 51423.}, | 44 {3, u"๐ฑ๐ญ๐ฐ๐ฎ๐ฏ", u"0", 10, 51423.}, |
45 {3, u"๐ฑ๐ญ๐ฐ๐ฎ๐ฏx", u"0", 10, 51423.}, | 45 {3, u"๐ฑ๐ญ๐ฐ๐ฎ๐ฏx", u"0", 10, 51423.}, |
46 {3, u" ๐ฑ๐ญ๐ฐ๐ฎ๐ฏ", u"0", 11, 51423.}, | 46 {3, u" ๐ฑ๐ญ๐ฐ๐ฎ๐ฏ", u"0", 11, 51423.}, |
47 {3, u"๐ฑ๐ญ๐ฐ๐ฎ๐ฏ ", u"0", 10, 51423.}, | 47 {3, u"๐ฑ๐ญ๐ฐ๐ฎ๐ฏ ", u"0", 10, 51423.}, |
48 {7, u"51,423", u"#,##,##0", 6, 51423.}, | 48 {7, u"51,423", u"#,##,##0", 6, 51423.}, |
49 {7, u" 51,423", u"#,##,##0", 7, 51423.}, | 49 {7, u" 51,423", u"#,##,##0", 7, 51423.}, |
50 {7, u"51,423 ", u"#,##,##0", 6, 51423.}, | 50 {7, u"51,423 ", u"#,##,##0", 6, 51423.}, |
| 51 {7, u"51,423,", u"#,##,##0", 6, 51423.}, |
| 52 {7, u"51,423,,", u"#,##,##0", 6, 51423.}, |
| 53 {7, u"51,423.5", u"#,##,##0", 8, 51423.5}, |
| 54 {7, u"51,423.5,", u"#,##,##0", 8, 51423.5}, |
| 55 {7, u"51,423.5,,", u"#,##,##0", 8, 51423.5}, |
| 56 {7, u"51,423.5.", u"#,##,##0", 8, 51423.5}, |
| 57 {7, u"51,423.5..", u"#,##,##0", 8, 51423.5}, |
51 {7, u"๐ฑ๐ญ,๐ฐ๐ฎ๐ฏ", u"#,##,##0", 11, 51423.}, | 58 {7, u"๐ฑ๐ญ,๐ฐ๐ฎ๐ฏ", u"#,##,##0", 11, 51423.}, |
52 {7, u"๐ณ,๐ด๐ต,๐ฑ๐ญ,๐ฐ๐ฎ๐ฏ", u"#,##,##0", 19, 78951423.}, | 59 {7, u"๐ณ,๐ด๐ต,๐ฑ๐ญ,๐ฐ๐ฎ๐ฏ", u"#,##,##0", 19, 78951423.}, |
53 {7, u"๐ณ๐ด,๐ต๐ฑ๐ญ.๐ฐ๐ฎ๐ฏ", u"#,##,##0", 18, 78951.423}, | 60 {7, u"๐ณ๐ด,๐ต๐ฑ๐ญ.๐ฐ๐ฎ๐ฏ", u"#,##,##0", 18, 78951.423}, |
54 {7, u"๐ณ๐ด,๐ฌ๐ฌ๐ฌ", u"#,##,##0", 11, 78000.}, | 61 {7, u"๐ณ๐ด,๐ฌ๐ฌ๐ฌ", u"#,##,##0", 11, 78000.}, |
55 {7, u"๐ณ๐ด,๐ฌ๐ฌ๐ฌ.๐ฌ๐ฌ๐ฌ", u"#,##,##0", 18, 78000.}, | 62 {7, u"๐ณ๐ด,๐ฌ๐ฌ๐ฌ.๐ฌ๐ฌ๐ฌ", u"#,##,##0", 18, 78000.}, |
56 {7, u"๐ณ๐ด,๐ฌ๐ฌ๐ฌ.๐ฌ๐ฎ๐ฏ", u"#,##,##0", 18, 78000.023}, | 63 {7, u"๐ณ๐ด,๐ฌ๐ฌ๐ฌ.๐ฌ๐ฎ๐ฏ", u"#,##,##0", 18, 78000.023}, |
57 {7, u"๐ณ๐ด.๐ฌ๐ฌ๐ฌ.๐ฌ๐ฎ๐ฏ", u"#,##,##0", 11, 78.}, | 64 {7, u"๐ณ๐ด.๐ฌ๐ฌ๐ฌ.๐ฌ๐ฎ๐ฏ", u"#,##,##0", 11, 78.}, |
| 65 {7, u"1,", u"#,##,##0", 1, 1.}, |
| 66 {7, u"1,,", u"#,##,##0", 1, 1.}, |
| 67 {7, u"1.,", u"#,##,##0", 2, 1.}, |
| 68 {3, u"1,.", u"#,##,##0", 3, 1.}, |
| 69 {7, u"1..", u"#,##,##0", 2, 1.}, |
| 70 {3, u",1", u"#,##,##0", 2, 1.}, |
| 71 {3, u"1,1", u"#,##,##0", 1, 1.}, |
| 72 {3, u"1,1,", u"#,##,##0", 1, 1.}, |
| 73 {3, u"1,1,,", u"#,##,##0", 1, 1.}, |
| 74 {3, u"1,1,1", u"#,##,##0", 1, 1.}, |
| 75 {3, u"1,1,1,", u"#,##,##0", 1, 1.}, |
| 76 {3, u"1,1,1,,", u"#,##,##0", 1, 1.}, |
58 {3, u"-51423", u"0", 6, -51423.}, | 77 {3, u"-51423", u"0", 6, -51423.}, |
59 {3, u"51423-", u"0", 5, 51423.}, // plus and minus sign by defa
ult do NOT match after | 78 {3, u"51423-", u"0", 5, 51423.}, // plus and minus sign by defa
ult do NOT match after |
60 {3, u"+51423", u"0", 6, 51423.}, | 79 {3, u"+51423", u"0", 6, 51423.}, |
61 {3, u"51423+", u"0", 5, 51423.}, // plus and minus sign by defa
ult do NOT match after | 80 {3, u"51423+", u"0", 5, 51423.}, // plus and minus sign by defa
ult do NOT match after |
62 {3, u"%51423", u"0", 6, 51423.}, | 81 {3, u"%51423", u"0", 6, 51423.}, |
63 {3, u"51423%", u"0", 6, 51423.}, | 82 {3, u"51423%", u"0", 6, 51423.}, |
64 {3, u"51423%%", u"0", 6, 51423.}, | 83 {3, u"51423%%", u"0", 6, 51423.}, |
65 {3, u"โฐ51423", u"0", 6, 51423.}, | 84 {3, u"โฐ51423", u"0", 6, 51423.}, |
66 {3, u"51423โฐ", u"0", 6, 51423.}, | 85 {3, u"51423โฐ", u"0", 6, 51423.}, |
67 {3, u"51423โฐโฐ", u"0", 6, 51423.}, | 86 {3, u"51423โฐโฐ", u"0", 6, 51423.}, |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 // Check that the matcher works on a sample string | 336 // Check that the matcher works on a sample string |
318 StringSegment segment(sampleParseableString, false); | 337 StringSegment segment(sampleParseableString, false); |
319 ParsedNumber result; | 338 ParsedNumber result; |
320 matcher.match(segment, result, status); | 339 matcher.match(segment, result, status); |
321 assertEquals(affixPattern + " " + cas.exactMatch, sampleParseableString.
length(), result.charEnd); | 340 assertEquals(affixPattern + " " + cas.exactMatch, sampleParseableString.
length(), result.charEnd); |
322 } | 341 } |
323 } | 342 } |
324 | 343 |
325 | 344 |
326 #endif | 345 #endif |
LEFT | RIGHT |