]> granicus.if.org Git - icu/log
icu
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 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 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

4 years agoadd a TODO to load the constants\' values from the units data
Younies Mahmoud [Wed, 6 May 2020 02:48:35 +0000 (04:48 +0200)]
add a TODO to load the constants\' values from the units data

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

fix substituteConstans function

4 years agofix substituteConstans function
Younies Mahmoud [Wed, 6 May 2020 02:28:35 +0000 (04:28 +0200)]
fix substituteConstans function

4 years agoMerge pull request #37 from younies/tryingdouble_staging
Younies Mahmoud [Wed, 6 May 2020 00:12:13 +0000 (02:12 +0200)]
Merge pull request #37 from younies/tryingdouble_staging

add substitution of the constant to `Factor`

4 years agoadd substitution of the constant to
Younies Mahmoud [Wed, 6 May 2020 00:07:36 +0000 (02:07 +0200)]
add substitution of the constant to

4 years agoMerge pull request #36 from younies/tryingdouble_staging
Younies Mahmoud [Tue, 5 May 2020 13:54:40 +0000 (15:54 +0200)]
Merge pull request #36 from younies/tryingdouble_staging

Fix Shane's comment about unitconverter.cpp

4 years agofix UnitConverter
Younies Mahmoud [Tue, 5 May 2020 13:48:19 +0000 (15:48 +0200)]
fix UnitConverter

4 years agoReduce number of binary searches again, resulting in more complexity.
Hugo van der Merwe [Tue, 5 May 2020 13:19:38 +0000 (15:19 +0200)]
Reduce number of binary searches again, resulting in more complexity.

4 years agoMore readable binarySearch at 4x worst-case cost.
Hugo van der Merwe [Tue, 5 May 2020 12:40:34 +0000 (14:40 +0200)]
More readable binarySearch at 4x worst-case cost.

With this hopefully more readable version, looking for an unknown
usage and region will result in the binary search being repeated four
times.

The previous version did not use a metadata instance comparator so
that individual components of the metadata key could be compared. A
comparator that returns status information on which of the components
had been found would be able to improve on this.

4 years agoOne improvement to error reporting.
Hugo van der Merwe [Tue, 5 May 2020 12:40:15 +0000 (14:40 +0200)]
One improvement to error reporting.

4 years agoMerge pull request #35 from younies/tryingdouble_staging
Younies Mahmoud [Tue, 5 May 2020 01:50:19 +0000 (03:50 +0200)]
Merge pull request #35 from younies/tryingdouble_staging

Fix dependencies and small nits

4 years agofix dependices and small nits
Younies Mahmoud [Tue, 5 May 2020 01:43:49 +0000 (03:43 +0200)]
fix dependices and small nits

4 years agoFirst set of code review improvements.
Hugo van der Merwe [Tue, 5 May 2020 00:42:03 +0000 (02:42 +0200)]
First set of code review improvements.

4 years agoFix dependencies.txt, add documentation, add appropriate UMemory inheritence.
Hugo van der Merwe [Mon, 4 May 2020 19:39:37 +0000 (21:39 +0200)]
Fix dependencies.txt, add documentation, add appropriate UMemory inheritence.

4 years agoMerge remote-tracking branch 'sffc/units-staging' into units_router
Hugo van der Merwe [Mon, 4 May 2020 18:00:37 +0000 (20:00 +0200)]
Merge remote-tracking branch 'sffc/units-staging' into units_router

4 years agoMerge pull request #34 from younies/tryingdouble_staging
Younies Mahmoud [Mon, 4 May 2020 13:07:05 +0000 (15:07 +0200)]
Merge pull request #34 from younies/tryingdouble_staging

Remove extractUnitInfo from UnitConverter's helpers

4 years agoremove extra spaces from the factors
Younies Mahmoud [Mon, 4 May 2020 13:06:05 +0000 (15:06 +0200)]
remove extra spaces from the factors

4 years agoUnitPreferences class in unitsdata.cpp
Hugo van der Merwe [Wed, 29 Apr 2020 21:30:04 +0000 (23:30 +0200)]
UnitPreferences class in unitsdata.cpp

4 years agoremove extractUnitInfo from UnitConverter's helpers
Younies Mahmoud [Mon, 4 May 2020 03:34:45 +0000 (05:34 +0200)]
remove extractUnitInfo from UnitConverter's helpers

4 years agoMerge pull request #33 from hugovdm/tryingdouble_unitsTestTxt
Younies Mahmoud [Sun, 3 May 2020 18:17:06 +0000 (20:17 +0200)]
Merge pull request #33 from hugovdm/tryingdouble_unitsTestTxt

testConversions: test UnitConverter against unitsTest.txt test cases

4 years agoMerge pull request #41 from hugovdm/units-staging
Shane F. Carr [Sat, 2 May 2020 02:11:40 +0000 (21:11 -0500)]
Merge pull request #41 from hugovdm/units-staging

Update unitsTest.txt and unitPreferencesTest.txt from current CLDR master

4 years agoUpdate unitsTest.txt and unitPreferencesTest.txt from current CLDR master.
Hugo van der Merwe [Thu, 30 Apr 2020 13:46:23 +0000 (15:46 +0200)]
Update unitsTest.txt and unitPreferencesTest.txt from current CLDR master.

4 years agotestConversions: test UnitConverter against unitsTest.txt test cases
Hugo van der Merwe [Wed, 29 Apr 2020 12:07:50 +0000 (14:07 +0200)]
testConversions: test UnitConverter against unitsTest.txt test cases

4 years agoMerge pull request #32 from hugovdm/tryingdouble
Younies Mahmoud [Thu, 30 Apr 2020 12:06:58 +0000 (14:06 +0200)]
Merge pull request #32 from hugovdm/tryingdouble

Reinstate assertEqualsNear that got lost in merge.

4 years agoReinstate assertEqualsNear that got lost in merge.
Hugo van der Merwe [Thu, 30 Apr 2020 08:25:28 +0000 (10:25 +0200)]
Reinstate assertEqualsNear that got lost in merge.

- Code compiles, `make check` returns OK.

4 years agomerge sffc/units-staging
Younies Mahmoud [Wed, 29 Apr 2020 23:48:25 +0000 (01:48 +0200)]
merge sffc/units-staging

4 years agoMerge pull request #39 from hugovdm/unitsTestTxt
Shane F. Carr [Wed, 29 Apr 2020 21:52:34 +0000 (16:52 -0500)]
Merge pull request #39 from hugovdm/unitsTestTxt

testConversions: test convertibility of unitsTest.txt test cases.

4 years agoAdd IntlTest::assertNotEquals() for int32_t.
Hugo van der Merwe [Wed, 29 Apr 2020 19:55:13 +0000 (21:55 +0200)]
Add IntlTest::assertNotEquals() for int32_t.

4 years agoRemove hard-coded unit tests that were pulled out of unitsTest.txt.
Hugo van der Merwe [Wed, 29 Apr 2020 16:14:55 +0000 (18:14 +0200)]
Remove hard-coded unit tests that were pulled out of unitsTest.txt.

4 years agoAdd some comments to UnitsTestContext.
Hugo van der Merwe [Wed, 29 Apr 2020 16:10:08 +0000 (18:10 +0200)]
Add some comments to UnitsTestContext.

4 years agoRemove the 'FIXME_skip_tests' bool and branch.
Hugo van der Merwe [Wed, 29 Apr 2020 15:11:28 +0000 (17:11 +0200)]
Remove the 'FIXME_skip_tests' bool and branch.

4 years agoUncomment pound-force-per-square-inch test in unitsTest.txt
Hugo van der Merwe [Wed, 29 Apr 2020 12:10:28 +0000 (14:10 +0200)]
Uncomment pound-force-per-square-inch test in unitsTest.txt

4 years agotestConversions: test convertibility of unitsTest.txt test cases.
Hugo van der Merwe [Tue, 28 Apr 2020 19:48:28 +0000 (21:48 +0200)]
testConversions: test convertibility of unitsTest.txt test cases.

4 years agoPost-merge: update code to make "make check" pass.
Hugo van der Merwe [Tue, 28 Apr 2020 19:55:19 +0000 (21:55 +0200)]
Post-merge: update code to make "make check" pass.

* MaybeStackVector<ConversionRateInfo> -> ConversionRates.
* Inherit from UMemory to make MaybeStackVector happy (UnitConverter
  and ConverterPreference).
* Hack around getUnitsData's bad interface.

Code is still bad though, unit tests don't cover everything:

* getUnitsData does not work correctly, and various things are marked
  with "WIP" comments (Work In Progress).

4 years agoMerge branch 'tryingdouble' into units_router
Hugo van der Merwe [Wed, 29 Apr 2020 11:34:18 +0000 (13:34 +0200)]
Merge branch 'tryingdouble' into units_router

4 years agoComplicated manual merge of branch 'units-staging' into tryingdouble
Hugo van der Merwe [Wed, 29 Apr 2020 07:28:10 +0000 (09:28 +0200)]
Complicated manual merge of branch 'units-staging' into tryingdouble

This adds a ConversionRates::getInternalList() that needs to be
removed again, by improving APIs appropriately.

4 years agoMerge pull request #32 from younies/check_convirtible_units
Shane F. Carr [Tue, 28 Apr 2020 22:39:05 +0000 (17:39 -0500)]
Merge pull request #32 from younies/check_convirtible_units

Check convertible units

4 years agoadd units_extra to unitsformatter dependencies
Younies Mahmoud [Tue, 28 Apr 2020 21:54:54 +0000 (23:54 +0200)]
add units_extra to unitsformatter dependencies

4 years agoMerge pull request #31 from hugovdm/check_convirtible_units
Younies Mahmoud [Tue, 28 Apr 2020 15:35:08 +0000 (17:35 +0200)]
Merge pull request #31 from hugovdm/check_convirtible_units

Enable "testConversions" test again

4 years agoMerge branch 'check_convirtible_units' into check_convirtible_units
Younies Mahmoud [Tue, 28 Apr 2020 15:34:35 +0000 (17:34 +0200)]
Merge branch 'check_convirtible_units' into check_convirtible_units

4 years agofix unitConverter and add ConversionRates class
Younies Mahmoud [Tue, 28 Apr 2020 15:31:41 +0000 (17:31 +0200)]
fix unitConverter and add ConversionRates class

4 years agoFix make check: dependencies.txt, fix units_extra deps
Hugo van der Merwe [Tue, 28 Apr 2020 15:16:01 +0000 (17:16 +0200)]
Fix make check: dependencies.txt, fix units_extra deps

4 years agoRemove a getUnitsData test failure, but the function is still broken.
Hugo van der Merwe [Tue, 28 Apr 2020 15:00:12 +0000 (17:00 +0200)]
Remove a getUnitsData test failure, but the function is still broken.

4 years agoMerge branch 'tryingdouble' into units_router
Hugo van der Merwe [Tue, 28 Apr 2020 14:06:23 +0000 (16:06 +0200)]
Merge branch 'tryingdouble' into units_router

Tweaked during merge: use the "getAllConversionInfo" function.

4 years agoMerge branch 'units-staging' into tryingdouble
Hugo van der Merwe [Tue, 28 Apr 2020 12:34:47 +0000 (14:34 +0200)]
Merge branch 'units-staging' into tryingdouble

Conflict resolution: uncomment unit tests that pass now, but were
previously disabled by commenting-out within units-staging.

4 years agoEnable "testConversions" test again.
Hugo van der Merwe [Mon, 27 Apr 2020 17:43:08 +0000 (19:43 +0200)]
Enable "testConversions" test again.

With MeasureUnit fixes merged, these tests seem to pass now.

4 years agofix dependencies.txt
Younies Mahmoud [Mon, 27 Apr 2020 13:40:45 +0000 (15:40 +0200)]
fix dependencies.txt

4 years agofix the header
Younies Mahmoud [Mon, 27 Apr 2020 12:53:13 +0000 (14:53 +0200)]
fix the header