Repository navigation
Conversation
This includes a Markdown document describing plans for ICU4J and then possibly backporting to ICU4C.
sffc
requested changes
May 27, 2020
| cleaned up before merging into the upstream unicode-org ICU repository. Some of | ||
| this content belongs in header files. | ||
|
|
||
| ## Internal Implementation Details: ICU4C |
Owner
There was a problem hiding this comment.
Implementation docs should go as comments in the header or source files.
Collaborator
Author
There was a problem hiding this comment.
I'm moving this to a Google Doc - much easier to comment/discuss, and intended as a way to help us better structure our approach to ICU4J.
|
|
||
| // Tests freshness of the constants in units.txt by simply loading each directly | ||
| // specified conversion rate into UnitConverter. | ||
| void UnitsTest::testConstantFreshness() { |
Owner
There was a problem hiding this comment.
What are you testing? There are no assertions in this function.
Collaborator
Author
There was a problem hiding this comment.
Example output when I change the "acre to meter-squared" definition to use a non-existent "acore_to_m2" constant:
testConstantFreshness data: expected success but got error: U_INVALID_FORMAT_ERROR - UnitConverter(<acre>, <square-meter>, status).
If U_INVALID_FORMAT_ERROR, please check that "icu4c/source/i18n/unitconverter.cpp" has all constants?
Factor for "acre" is: "acre_to_m2".
Full list of constants: "G" "PI" "ft2_to_m2" "ft3_to_m3" "ft_to_m" "gal_imp_to_m3" "gal_to_m3" "gravity" "in3_to_m3" "lb_to_kg" - (Are you missing data?)
5 tasks
hugovdm
marked this pull request as draft
June 16, 2020 16:57
Collaborator
Author
|
Closing this PR in favour of icu-units#20 - its first commit (678b3d5) is a squashed version of this PR, rebased on units-staging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Blocked on #48 which will open up some internals for more direct testing.
Checklist