]> granicus.if.org Git - icu/log
icu
4 years agoMove new assertEqualsNear code into place.
Hugo van der Merwe [Wed, 17 Jun 2020 22:39:53 +0000 (00:39 +0200)]
Move new assertEqualsNear code into place.

4 years agoTemporarily restore assertEqualsNear.
Hugo van der Merwe [Wed, 17 Jun 2020 20:59:56 +0000 (22:59 +0200)]
Temporarily restore assertEqualsNear.

This function was restored as part of the original merge of
units-staging into this development branch, in case it was in used in
new code in units-staging.

With the rebase, we are thus also restoring it temporarily, at the
point in the sequence of commits where the merge had been.

4 years agoCode review feedback. Temporarily 'assertEqualsNewNear'.
Hugo van der Merwe [Tue, 9 Jun 2020 22:55:20 +0000 (00:55 +0200)]
Code review feedback. Temporarily 'assertEqualsNewNear'.

4 years agoUse uprv_fabs. (abs() is for integer types.)
Hugo van der Merwe [Mon, 11 May 2020 18:19:50 +0000 (20:19 +0200)]
Use uprv_fabs. (abs() is for integer types.)

4 years agoAttempt to disambiguate 'abs', for MacOSX build failure.
Hugo van der Merwe [Mon, 11 May 2020 17:12:41 +0000 (19:12 +0200)]
Attempt to disambiguate 'abs', for MacOSX build failure.

4 years agoImprove @param delta documentation.
Hugo van der Merwe [Mon, 11 May 2020 15:02:28 +0000 (17:02 +0200)]
Improve @param delta documentation.

4 years agoUse JUnit-like assertEquals. Improve test messages.
Hugo van der Merwe [Mon, 11 May 2020 14:53:29 +0000 (16:53 +0200)]
Use JUnit-like assertEquals. Improve test messages.

4 years agoUpdate code for correct NaN/Inf handling.
Hugo van der Merwe [Thu, 30 Apr 2020 10:54:11 +0000 (12:54 +0200)]
Update code for correct NaN/Inf handling.

4 years agoCreate assertEquals for double with a delta parameter.
Hugo van der Merwe [Thu, 30 Apr 2020 10:54:11 +0000 (12:54 +0200)]
Create assertEquals for double with a delta parameter.

4 years agoMerge pull request #51 from hugovdm/units-staging-import-cldr-units
Hugo [Wed, 17 Jun 2020 20:27:03 +0000 (22:27 +0200)]
Merge pull request #51 from hugovdm/units-staging-import-cldr-units

Update supplementalData.txt and units.txt from upstream PR #1173

4 years agoAdd -DcldrVersion=37 to 'ant -f build-icu-data.xml' command-line.
Hugo van der Merwe [Wed, 17 Jun 2020 14:32:50 +0000 (16:32 +0200)]
Add -DcldrVersion=37 to 'ant -f build-icu-data.xml' command-line.

Pull Request for this branch: https://github.com/sffc/icu/pull/51

4 years agoUpdate supplementalData.txt and units.txt from CLDR&ICU master
Hugo van der Merwe [Mon, 15 Jun 2020 15:21:13 +0000 (17:21 +0200)]
Update supplementalData.txt and units.txt from CLDR&ICU master

4 years agoMerge pull request #30 from younies/units_router
Younies Mahmoud [Wed, 17 Jun 2020 15:17:43 +0000 (17:17 +0200)]
Merge pull request #30 from younies/units_router

Implementation of UnitsRouter and ComplexUnitConverter.

4 years agofix MeasureUnit::simplify method
younies [Tue, 16 Jun 2020 20:54:03 +0000 (22:54 +0200)]
fix MeasureUnit::simplify method

4 years agoadd a hint for sorting the units
younies [Tue, 16 Jun 2020 19:05:23 +0000 (21:05 +0200)]
add a hint for sorting the units

4 years agoadd U_FAILURE(status) in emplaceBackAndConfirm
younies [Tue, 16 Jun 2020 18:57:18 +0000 (20:57 +0200)]
add U_FAILURE(status) in emplaceBackAndConfirm

4 years agofix small typo
younies [Tue, 16 Jun 2020 18:54:27 +0000 (20:54 +0200)]
fix small typo

4 years agofix findAndMerge function
younies [Tue, 16 Jun 2020 18:14:44 +0000 (20:14 +0200)]
fix findAndMerge function

4 years agofix small style
younies [Tue, 16 Jun 2020 17:04:11 +0000 (19:04 +0200)]
fix small style

4 years agofix various parts of the code
younies [Tue, 16 Jun 2020 16:28:30 +0000 (18:28 +0200)]
fix various parts of the code

4 years agofix warning in UnitsRouter#route function
younies [Sun, 14 Jun 2020 09:33:33 +0000 (11:33 +0200)]
fix warning in UnitsRouter#route function

4 years agoadd formattable to unitsformatter
Younies Mahmoud [Sun, 14 Jun 2020 07:28:26 +0000 (09:28 +0200)]
add formattable to unitsformatter

4 years agofix dependices
younies [Sun, 14 Jun 2020 06:46:13 +0000 (08:46 +0200)]
fix dependices

4 years agoremove unneeded test case
younies [Sat, 13 Jun 2020 20:50:09 +0000 (22:50 +0200)]
remove unneeded test case

4 years agofix simplify function
younies [Sat, 13 Jun 2020 16:14:51 +0000 (18:14 +0200)]
fix simplify function

4 years agofix formatting
younies [Sat, 13 Jun 2020 13:37:15 +0000 (15:37 +0200)]
fix formatting

4 years agoadd arounding epsilon to correct the error in the double operation
younies [Sat, 13 Jun 2020 13:36:14 +0000 (15:36 +0200)]
add arounding epsilon to correct the error in the double operation

4 years agoadd MeasureUnit#simplify method to simplify the units when we check the convertibility
younies [Sat, 13 Jun 2020 13:28:32 +0000 (15:28 +0200)]
add MeasureUnit#simplify method to simplify the units when we check the convertibility

4 years agoMerge pull request #49 from younies/units_router_younies
Younies Mahmoud [Fri, 12 Jun 2020 22:12:51 +0000 (00:12 +0200)]
Merge pull request #49 from younies/units_router_younies

add emplaceBackAndConfirm to not confirm the emplace back everytime

4 years agoadd emplaceBackAndConfirm to not confirm the emplace back everytime
Younies Mahmoud [Fri, 12 Jun 2020 22:10:58 +0000 (00:10 +0200)]
add emplaceBackAndConfirm to not confirm the emplace back everytime

4 years agoMerge pull request #48 from younies/units_router_younies
Younies Mahmoud [Fri, 12 Jun 2020 13:18:43 +0000 (15:18 +0200)]
Merge pull request #48 from younies/units_router_younies

fix complext number format

4 years agofix complext number format
Younies Mahmoud [Fri, 12 Jun 2020 13:10:59 +0000 (15:10 +0200)]
fix complext number format

4 years agoMerge pull request #47 from younies/units_router_younies
Younies Mahmoud [Fri, 12 Jun 2020 10:13:33 +0000 (12:13 +0200)]
Merge pull request #47 from younies/units_router_younies

add a printf in units router to print the unit preferences

4 years agoremove non needed fprintf
Younies Mahmoud [Fri, 12 Jun 2020 10:13:02 +0000 (12:13 +0200)]
remove non needed fprintf

4 years agofinalize Units Router
Younies Mahmoud [Fri, 12 Jun 2020 10:09:58 +0000 (12:09 +0200)]
finalize Units Router

4 years agoMerge branch 'units_router' into units_router_younies
Hugo van der Merwe [Thu, 11 Jun 2020 17:44:20 +0000 (19:44 +0200)]
Merge branch 'units_router' into units_router_younies

4 years agoFix unit test affected by CLDR units data hack.
Hugo van der Merwe [Thu, 11 Jun 2020 17:40:39 +0000 (19:40 +0200)]
Fix unit test affected by CLDR units data hack.

4 years agoadd internal illustration and split only the outputUnits when it is UMEASURE_UNIT_MIXED
Younies Mahmoud [Thu, 11 Jun 2020 16:31:50 +0000 (18:31 +0200)]
add internal illustration and split only the outputUnits when it is UMEASURE_UNIT_MIXED

4 years agoMerge branch 'units_router' of github.com:younies/icu into units_router_younies
Younies Mahmoud [Wed, 10 Jun 2020 13:27:47 +0000 (15:27 +0200)]
Merge branch 'units_router' of github.com:younies/icu into units_router_younies

4 years agohangle precision
Younies Mahmoud [Wed, 10 Jun 2020 13:27:36 +0000 (15:27 +0200)]
hangle precision

4 years agoHack for CLDR units data: use "inch" below 3 feet.
Hugo van der Merwe [Wed, 10 Jun 2020 13:25:33 +0000 (15:25 +0200)]
Hack for CLDR units data: use "inch" below 3 feet.

4 years agoMerge remote-tracking branch 'sffc/units-staging' into units_router
Hugo van der Merwe [Wed, 10 Jun 2020 08:01:11 +0000 (10:01 +0200)]
Merge remote-tracking branch 'sffc/units-staging' into units_router

4 years agomerge sffc units-staging branch
Younies Mahmoud [Wed, 10 Jun 2020 06:54:18 +0000 (08:54 +0200)]
merge sffc units-staging branch

4 years agoMerge pull request #47 from hugovdm/stringpiecify
Shane F. Carr [Tue, 9 Jun 2020 23:29:41 +0000 (18:29 -0500)]
Merge pull request #47 from hugovdm/stringpiecify

Change getPreferencesFor parameters from char* to StringPiece.

4 years agoDrop 'const', it's by-value anyway.
Hugo van der Merwe [Tue, 9 Jun 2020 22:40:49 +0000 (00:40 +0200)]
Drop 'const', it's by-value anyway.

4 years agoTemporary hacky override of 'SE road' preferences.
Hugo van der Merwe [Tue, 9 Jun 2020 22:15:38 +0000 (00:15 +0200)]
Temporary hacky override of 'SE road' preferences.

4 years agoPass StringPiece instances to getPreferencesFor.
Hugo van der Merwe [Tue, 9 Jun 2020 21:59:21 +0000 (23:59 +0200)]
Pass StringPiece instances to getPreferencesFor.

4 years agoChange getPreferencesFor parameters from char* to StringPiece.
Hugo van der Merwe [Tue, 9 Jun 2020 21:00:35 +0000 (23:00 +0200)]
Change getPreferencesFor parameters from char* to StringPiece.

4 years agoChange getPreferencesFor parameters from char* to StringPiece.
Hugo van der Merwe [Tue, 9 Jun 2020 21:00:35 +0000 (23:00 +0200)]
Change getPreferencesFor parameters from char* to StringPiece.

4 years agofix fprintf for printing floating number
Younies Mahmoud [Tue, 9 Jun 2020 19:58:57 +0000 (21:58 +0200)]
fix fprintf for printing floating number

4 years agoadd a printf in units router to print the unit preferences
Younies Mahmoud [Tue, 9 Jun 2020 19:27:57 +0000 (21:27 +0200)]
add a printf in units router to print the unit preferences

4 years agoMerge pull request #46 from younies/units_router_younies
Younies Mahmoud [Tue, 9 Jun 2020 17:50:26 +0000 (19:50 +0200)]
Merge pull request #46 from younies/units_router_younies

add the internal design documentation

4 years agoMerge pull request #46 from hugovdm/moreUnitsDataTest
Shane F. Carr [Tue, 9 Jun 2020 17:32:26 +0000 (12:32 -0500)]
Merge pull request #46 from hugovdm/moreUnitsDataTest

Add six more unit tests for getPreferencesFor.

4 years agoAdd six more unit tests for getPreferencesFor.
Hugo van der Merwe [Tue, 9 Jun 2020 13:56:53 +0000 (15:56 +0200)]
Add six more unit tests for getPreferencesFor.

4 years agoadd the internal design documentation
Younies Mahmoud [Tue, 9 Jun 2020 12:56:28 +0000 (14:56 +0200)]
add the internal design documentation

4 years agoMerge pull request #45 from younies/units_router_younies
Younies Mahmoud [Tue, 9 Jun 2020 06:53:07 +0000 (08:53 +0200)]
Merge pull request #45 from younies/units_router_younies

fix the merge of sffc/units-staging

4 years agofix small typo
Younies Mahmoud [Tue, 9 Jun 2020 06:51:31 +0000 (08:51 +0200)]
fix small typo

4 years agofix the merge of sffc/units-staging
Younies Mahmoud [Mon, 8 Jun 2020 18:12:48 +0000 (20:12 +0200)]
fix the merge of sffc/units-staging

4 years agoMerge pull request #44 from younies/units_router_younies
Younies Mahmoud [Mon, 8 Jun 2020 17:58:36 +0000 (19:58 +0200)]
Merge pull request #44 from younies/units_router_younies

Merge sffc/units-staging branch

4 years agoMerge branch 'units-staging' of github.com:sffc/icu into units_router_younies
Younies Mahmoud [Mon, 8 Jun 2020 17:56:34 +0000 (19:56 +0200)]
Merge branch 'units-staging' of github.com:sffc/icu into units_router_younies

4 years agoMerge pull request #43 from younies/units_router_younies
Younies Mahmoud [Mon, 8 Jun 2020 17:56:15 +0000 (19:56 +0200)]
Merge pull request #43 from younies/units_router_younies

fix units router and allow the test cases to compare double numbers w…

4 years agofix units router and allow the test cases to compare double numbers with precision
Younies Mahmoud [Mon, 8 Jun 2020 17:52:07 +0000 (19:52 +0200)]
fix units router and allow the test cases to compare double numbers with precision

4 years agoMerge pull request #23 from younies/unit_header
Hugo [Thu, 28 May 2020 08:42:56 +0000 (10:42 +0200)]
Merge pull request #23 from younies/unit_header

add usage to number formatter settings header

4 years agoMerge pull request #45 from hugovdm/usagefix
Hugo [Thu, 28 May 2020 08:41:28 +0000 (10:41 +0200)]
Merge pull request #45 from hugovdm/usagefix

Support usage component dropping, and more

4 years agoDrop unnecessary reference to "draft API".
Hugo van der Merwe [Wed, 27 May 2020 22:46:28 +0000 (00:46 +0200)]
Drop unnecessary reference to "draft API".

4 years agoAdd an error check, as per code review.
Hugo van der Merwe [Wed, 27 May 2020 22:33:11 +0000 (00:33 +0200)]
Add an error check, as per code review.

4 years agoSupport usage component dropping, and more:
Hugo van der Merwe [Wed, 27 May 2020 22:09:55 +0000 (00:09 +0200)]
Support usage component dropping, and more:

- Improve efficiency by not constructing UnitPreferenceMetadata instance
  in binarySearch: reuse an instance passed in.
- Fix stale documentation. (Doc freshness is hard! ;-)
- getPreferenceMetadataIndex actually returns -1 upon failure.

4 years agoAdd test cases for dropping last component(s) of usage.
Hugo van der Merwe [Wed, 27 May 2020 18:04:36 +0000 (20:04 +0200)]
Add test cases for dropping last component(s) of usage.

4 years agoICU 68 (not 67). Add U_HIDE_DRAFT_API ifdef guards.
Hugo van der Merwe [Tue, 26 May 2020 22:49:19 +0000 (00:49 +0200)]
ICU 68 (not 67). Add U_HIDE_DRAFT_API ifdef guards.

4 years agoSome more documentation tweaks.
Hugo van der Merwe [Tue, 26 May 2020 13:40:32 +0000 (15:40 +0200)]
Some more documentation tweaks.

4 years agoClarify the documentation.
Hugo van der Merwe [Mon, 25 May 2020 22:28:56 +0000 (00:28 +0200)]
Clarify the documentation.

4 years agoImplement full output testing for unitPreferencesTest.txt tests.
Hugo van der Merwe [Fri, 22 May 2020 17:33:37 +0000 (19:33 +0200)]
Implement full output testing for unitPreferencesTest.txt tests.

4 years agoAdd error-handling to avoid assertion failure.
Hugo van der Merwe [Thu, 21 May 2020 21:19:35 +0000 (23:19 +0200)]
Add error-handling to avoid assertion failure.

4 years agoMerge pull request #42 from younies/unit_header_staging
Younies Mahmoud [Tue, 19 May 2020 13:45:51 +0000 (15:45 +0200)]
Merge pull request #42 from younies/unit_header_staging

Add missing comments ...

4 years agoadd a note about with sub usage
Younies Mahmoud [Tue, 19 May 2020 13:42:23 +0000 (15:42 +0200)]
add a note about  with sub usage

4 years agoadd a note about with empty string
Younies Mahmoud [Tue, 19 May 2020 13:34:48 +0000 (15:34 +0200)]
add a note about  with empty string

4 years agoMerge pull request #43 from hugovdm/getUnitCategory
Hugo [Thu, 14 May 2020 19:42:45 +0000 (21:42 +0200)]
Merge pull request #43 from hugovdm/getUnitCategory

Add getUnitCategory()

4 years agoMerge branch 'units-staging' into getUnitCategory
Hugo van der Merwe [Thu, 14 May 2020 19:07:59 +0000 (21:07 +0200)]
Merge branch 'units-staging' into getUnitCategory

4 years agoTODO(CLDR-13787) for improving inverse handling.
Hugo van der Merwe [Thu, 14 May 2020 19:05:03 +0000 (21:05 +0200)]
TODO(CLDR-13787) for improving inverse handling.

4 years agoAdd unit tests, improve docs, add a FIXME for consumption-inverse.
Hugo van der Merwe [Wed, 13 May 2020 14:44:50 +0000 (16:44 +0200)]
Add unit tests, improve docs, add a FIXME for consumption-inverse.

4 years agoMerge branch 'units-staging' into units_router
Hugo van der Merwe [Tue, 12 May 2020 18:55:45 +0000 (20:55 +0200)]
Merge branch 'units-staging' into units_router

4 years agoMerge pull request #42 from hugovdm/UnitPreferences
Shane F. Carr [Tue, 12 May 2020 18:41:30 +0000 (13:41 -0500)]
Merge pull request #42 from hugovdm/UnitPreferences

UnitPreferences class in unitsdata.cpp

4 years agoMerge pull request #41 from hugovdm/units_router_prefstest
Younies Mahmoud [Tue, 12 May 2020 10:35:27 +0000 (12:35 +0200)]
Merge pull request #41 from hugovdm/units_router_prefstest

Test UnitsRouter constructor and fix category/preferences handling

4 years agoAdd getUnitCategory.
Hugo van der Merwe [Mon, 11 May 2020 22:43:03 +0000 (00:43 +0200)]
Add getUnitCategory.

4 years agofixup! Use UnitPreferences, drop getUnitsData and related.
Hugo van der Merwe [Mon, 11 May 2020 22:33:51 +0000 (00:33 +0200)]
fixup! Use UnitPreferences, drop getUnitsData and related.

4 years agoStart hooking up UnitsRouter and unitPreferencesTest.txt.
Hugo van der Merwe [Mon, 11 May 2020 19:07:24 +0000 (21:07 +0200)]
Start hooking up UnitsRouter and unitPreferencesTest.txt.

4 years agoAdd getUnitCategory.
Hugo van der Merwe [Mon, 11 May 2020 22:43:03 +0000 (00:43 +0200)]
Add getUnitCategory.

4 years agoUse UnitPreferences, drop getUnitsData and related.
Hugo van der Merwe [Mon, 11 May 2020 20:17:50 +0000 (22:17 +0200)]
Use UnitPreferences, drop getUnitsData and related.

4 years agoMerge PR#42 into units_router_unitprefs (branch 'UnitPreferences')
Hugo van der Merwe [Mon, 11 May 2020 19:24:21 +0000 (21:24 +0200)]
Merge PR#42 into units_router_unitprefs (branch 'UnitPreferences')

(PR still open.)

4 years agoconst implemented: const UnitPreferences *const
Hugo van der Merwe [Sat, 9 May 2020 00:56:11 +0000 (02:56 +0200)]
const implemented: const UnitPreferences *const

4 years agoMerge pull request #40 from younies/units_router_younies
Younies Mahmoud [Fri, 8 May 2020 15:46:44 +0000 (17:46 +0200)]
Merge pull request #40 from younies/units_router_younies

Merge sffc/units-staging

4 years agomerge units-staging 3
Younies Mahmoud [Fri, 8 May 2020 14:14:51 +0000 (16:14 +0200)]
merge units-staging 3

4 years agomerge units-staging
Younies Mahmoud [Fri, 8 May 2020 14:02:07 +0000 (16:02 +0200)]
merge units-staging

4 years agomerge units-staging
Younies Mahmoud [Fri, 8 May 2020 11:36:10 +0000 (13:36 +0200)]
merge units-staging

4 years agoCode review feedback incorporated.
Hugo van der Merwe [Fri, 8 May 2020 00:30:06 +0000 (02:30 +0200)]
Code review feedback incorporated.

4 years agoMerge branch 'units-staging' into UnitPreferences
Hugo van der Merwe [Thu, 7 May 2020 11:28:40 +0000 (13:28 +0200)]
Merge branch 'units-staging' into UnitPreferences

4 years agoMerge pull request #21 from younies/tryingdouble
Younies Mahmoud [Thu, 7 May 2020 11:24:31 +0000 (13:24 +0200)]
Merge pull request #21 from younies/tryingdouble

Add unit converter.

4 years agoconst annotations for getPreferencesFor() and thus getAlias()
Hugo van der Merwe [Wed, 6 May 2020 13:20:23 +0000 (15:20 +0200)]
const annotations for getPreferencesFor() and thus getAlias()

4 years agoImplement slicing via `UnitPreference **&outPreferences`.
Hugo van der Merwe [Wed, 6 May 2020 13:07:48 +0000 (15:07 +0200)]
Implement slicing via `UnitPreference **&outPreferences`.

(Still multiple TODOs for make things cleaner/neater.)

4 years agoMerge pull request #39 from younies/tryingdouble_staging
Younies Mahmoud [Wed, 6 May 2020 02:49:32 +0000 (04:49 +0200)]
Merge pull request #39 from younies/tryingdouble_staging

add a TODO to load the constants\' values from the units data