Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICU-22746 Import tests from ICU4J and make more tests data-driven #2998

Merged
merged 1 commit into from May 13, 2024

Conversation

catamorphism
Copy link
Contributor

@catamorphism catamorphism commented May 7, 2024

This change brings in all the tests from ICU4J (some are marked as "ignored" with a JIRA ticket number, which is a capability I added to the JSON test harness added in #2980 .)

It also includes some code changes: to fix number selection and to fix some of the options for number formatting, which were exposed as not-working by the ICU4J tests. I chose to include these code changes in this PR so that all of the ICU4J tests could be added in one PR.

I put all of the ICU4J tests in a separate subdirectory: testdata/message2/icu4j/ . These files will need to be kept consistent with ICU4J manually (from previous discussions, I understand that there's no way to share test data between ICU4J and ICU4C).

Checklist
  • Required: Issue filed: https://unicode-org.atlassian.net/browse/ICU-22746
  • Required: The PR title must be prefixed with a JIRA Issue number.
  • Required: The PR description must include the link to the Jira Issue, for example by completing the URL in the first checklist item
  • Required: Each commit message must be prefixed with a JIRA Issue number.
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable

@catamorphism catamorphism marked this pull request as ready for review May 7, 2024 22:41
@catamorphism
Copy link
Contributor Author

cc @echeran @mihnita

@mihnita
Copy link
Contributor

mihnita commented May 10, 2024

LGTM, thank you.

I think it would be good to share the files somehow, but that is not to be solved here.
Before the next release we probably need to change the .json files according to the new schema anyway.

Mihai

Copy link
Contributor

@mihnita mihnita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!
M

@mihnita
Copy link
Contributor

mihnita commented May 10, 2024

@markusicu Reviewed, but I can't squash.

I get:

NOTICE: Your previous squash attempt failed with code 404.
If you get this error repeatedly, you may not have permission to push to this repository.

@mihnita mihnita requested a review from markusicu May 10, 2024 21:07
@mihnita
Copy link
Contributor

mihnita commented May 10, 2024

Optional, @catamorphism : you can squash the 6 commits on your side (making sure the final commit is named "ICU-22746 Import tests from ICU4J and make more tests data-driven") and force-push

@jira-pull-request-webhook
Copy link

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

@catamorphism
Copy link
Contributor Author

Squashed, thanks!

Includes code fixes for `numberingSystem`, `percent`,
and `precision` options in `:number`

Also includes a code fix for number selection:
  Refactor code to conform more closely to the steps in the spec,
  and call the number formatter before the selector so that a FormattedNumber
  with the right options is selected on

Some modifications were needed to add missing params
and to mark some tests as ignored (see ICU-22754).
Also added decimal arguments in JSON test reader

Finally, some redundant tests are removed:
all tests in messageformat2test_features and
messageformat2test_icu, and
messageformat2test_builtin are now covered by JSON tests
@jira-pull-request-webhook
Copy link

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

@catamorphism
Copy link
Contributor Author

I've rebased and force-pushed, which Mihai suggested in order to fix the MSYS2 GCC build failure.

@mihnita mihnita merged commit 6d5555a into unicode-org:main May 13, 2024
97 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants