CLDR-19466 Document decimal format test data files and usage in README#5813
CLDR-19466 Document decimal format test data files and usage in README#5813younies wants to merge 1 commit into
Conversation
9bf7848 to
d45ee3e
Compare
|
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
| @@ -0,0 +1,62 @@ | |||
| # CLDR Decimal Format Test Data (`common/testData/decimal`) | |||
|
|
|||
| This directory contains Tab-Separated Values (TSV) files used as a solid blueprint for testing and verifying decimal and compact decimal formats in CLDR, based on ICU4J. | |||
There was a problem hiding this comment.
| This directory contains Tab-Separated Values (TSV) files used as a solid blueprint for testing and verifying decimal and compact decimal formats in CLDR, based on ICU4J. | |
| This directory contains Tab-Separated Values (TSV) files used for testing decimal and compact decimal formats in CLDR. |
This is more accurate and avoids the awkward phrasing "solid blueprint"
| The test data is organized into three separate files to separate core verification from extended coverage: | ||
|
|
||
| 1. **`decimals.tsv`** | ||
| Contains verification tests for the **core** CLDR locales across standard number formats, compact format lengths, and representative numeric input values. |
There was a problem hiding this comment.
| Contains verification tests for the **core** CLDR locales across standard number formats, compact format lengths, and representative numeric input values. | |
| Contains verification tests for a selected set of numbers and locales that illustrate most features of number formatting, covering standard number formats, compact format lengths, and representative numeric input values. |
| Contains verification tests for the **core** CLDR locales across standard number formats, compact format lengths, and representative numeric input values. | ||
|
|
||
| 2. **`decimals_modern_locales.tsv`** | ||
| Contains verification tests for all **modern** CLDR locales **minus** the core locales covered in `decimals.tsv`. |
There was a problem hiding this comment.
| Contains verification tests for all **modern** CLDR locales **minus** the core locales covered in `decimals.tsv`. | |
| Contains verification tests for all **modern-coverage** CLDR locales **minus** the locales covered in `decimals.tsv`. It also only uses a small set of selected numbers. |
| Contains verification tests for all **modern** CLDR locales **minus** the core locales covered in `decimals.tsv`. | ||
|
|
||
| 3. **`decimals_extended_numbers.tsv`** | ||
| Contains extended numeric test inputs (covering edge cases, large numbers, and small fractions) across standard formats and core locales for comprehensive verification. |
There was a problem hiding this comment.
| Contains extended numeric test inputs (covering edge cases, large numbers, and small fractions) across standard formats and core locales for comprehensive verification. | |
| Contains extended numeric test inputs (covering edge cases, large numbers, and small fractions) across standard formats and selected locales for more comprehensive verification. |
| * **`number_format`**: The number format dimension (`decimal`, `percent`, `scientific`). | ||
| * **`format_length`**: The compact format length (`short`, `long`). If empty/blank, it represents standard non-compact formatting. | ||
| * **`input`**: The floating-point numeric input value (e.g., `1.2`, `1234565.0`). | ||
| * **`expected`**: The literal expected output string, including all correct localized digits, grouping separators, percent signs, and bi-directional control characters (such as `\u200E` / LRM). |
There was a problem hiding this comment.
| * **`expected`**: The literal expected output string, including all correct localized digits, grouping separators, percent signs, and bi-directional control characters (such as `\u200E` / LRM). | |
| * **`expected`**: The expected output string, including all correct localized digits, grouping separators, percent signs, and bi-directional control characters (such as `\u200E` / LRM). |
|
|
||
| ### 1. Automated Testing | ||
|
|
||
| #### Testing in Java |
| mvn test -pl tools/cldr-code -Dtest=TestDecimalFormat | ||
| ``` | ||
|
|
||
| #### Testing in Other Languages |
| 3. Invokes your target number formatting implementation using the parsed parameters and numeric input. | ||
| 4. Asserts that the generated output exactly matches the `expected` UTF-8 literal string. | ||
|
|
||
| ### 2. Manual Verification |
There was a problem hiding this comment.
Dropped the numbering on these sections
sffc
left a comment
There was a problem hiding this comment.
+1 on all of @macchiati's comments
|
thanks @macchiati for the comments, I will follow the same style with the currency testing too. |
9cf8126 to
e6663a7
Compare
|
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
sffc
left a comment
There was a problem hiding this comment.
The prose is fine, though in currency data, where we have more dimensions, I think we should be more clear and specific about which sets of options are used where.
CLDR-19466
Summary
Addressed PR #5709 feedback by adding a comprehensive
README.mdtocommon/testData/decimal/.Key Details
decimals_modern_locales.tsvcovers modern locales minus the core locales indecimals.tsv.locale,number_format,format_length,input,expected).TestDecimalFormat), manual spreadsheet inspection, and data regeneration (GenerateDecimalFormatTestData).ALLOW_MANY_COMMITS=true