icu
4 years agoAdd string length checks to testGetUnitsData.
Hugo van der Merwe [Fri, 20 Mar 2020 15:00:41 +0000 (16:00 +0100)]
Add string length checks to testGetUnitsData.

4 years agoMerge branch 'units_router' of github.com:younies/icu into units_router
Younies Mahmoud [Fri, 20 Mar 2020 14:44:49 +0000 (15:44 +0100)]
Merge branch 'units_router' of github.com:younies/icu into units_router

4 years agofix building units router branch
Younies Mahmoud [Fri, 20 Mar 2020 14:44:31 +0000 (15:44 +0100)]
fix building units router branch

4 years agoMerge pull request #6 from hugovdm/younies-units_router-convert
Younies Mahmoud [Fri, 20 Mar 2020 14:43:13 +0000 (15:43 +0100)]
Merge pull request #6 from hugovdm/younies-units_router-convert

Various resource-loading code and documentation improvements.

4 years agoVarious resource-loading code and documentation improvements.
Hugo van der Merwe [Fri, 20 Mar 2020 13:40:35 +0000 (14:40 +0100)]
Various resource-loading code and documentation improvements.

4 years agoMerge pull request #5 from hugovdm/younies-units_router-convert
Younies Mahmoud [Fri, 20 Mar 2020 11:53:09 +0000 (12:53 +0100)]
Merge pull request #5 from hugovdm/younies-units_router-convert

Hook up data-driven unit conversion tests

4 years agoAvoid adding duplicate conversion rate data.
Hugo van der Merwe [Fri, 20 Mar 2020 11:20:44 +0000 (12:20 +0100)]
Avoid adding duplicate conversion rate data.

Also includes some cosmetic and readability improvements.

4 years agoLittle fixes to unitconverter.cpp
Hugo van der Merwe [Thu, 19 Mar 2020 20:38:20 +0000 (21:38 +0100)]
Little fixes to unitconverter.cpp

4 years agoHook up data-driven unit conversion tests: triggers segfault
Hugo van der Merwe [Fri, 13 Mar 2020 17:17:48 +0000 (18:17 +0100)]
Hook up data-driven unit conversion tests: triggers segfault

Contains a "FIXME_*" boolean for selecting between fprintf and
constructing a UnitConverter, because the UnitConverter constructor is
currently segfaulting.

Also contains some clean-up of testConversions code.

4 years agomerge tryingdouble branch
Younies Mahmoud [Thu, 19 Mar 2020 14:14:55 +0000 (15:14 +0100)]
merge tryingdouble branch

4 years agoMerge pull request #4 from hugovdm/younies_units_router_resources
Younies Mahmoud [Thu, 19 Mar 2020 13:33:55 +0000 (14:33 +0100)]
Merge pull request #4 from hugovdm/younies_units_router_resources

Add units resources data loading. (Unit test is WIP.)

4 years agoRemove namespace hacks. Trust code review will deal with 'work in progress'.
Hugo van der Merwe [Thu, 19 Mar 2020 12:44:32 +0000 (13:44 +0100)]
Remove namespace hacks. Trust code review will deal with 'work in progress'.

4 years agoFix default geq: 1, not 0.
Hugo van der Merwe [Thu, 19 Mar 2020 12:05:41 +0000 (13:05 +0100)]
Fix default geq: 1, not 0.

4 years agoMerge branch 'units_router' into younies_units_router_resources
Hugo van der Merwe [Thu, 19 Mar 2020 12:03:15 +0000 (13:03 +0100)]
Merge branch 'units_router' into younies_units_router_resources

4 years agoremove std::string
Younies Mahmoud [Thu, 19 Mar 2020 02:28:30 +0000 (03:28 +0100)]
remove std::string

4 years agoadd unitsroutertest.cpp
Younies Mahmoud [Thu, 19 Mar 2020 02:21:44 +0000 (03:21 +0100)]
add unitsroutertest.cpp

4 years agoAdd skeleton for testing units router
Younies Mahmoud [Thu, 19 Mar 2020 01:59:26 +0000 (02:59 +0100)]
Add skeleton for testing units router

4 years agoStrip down ConversionRateInfo to only four CharStrings.
Hugo van der Merwe [Thu, 19 Mar 2020 00:45:27 +0000 (01:45 +0100)]
Strip down ConversionRateInfo to only four CharStrings.

4 years agoWIP: Add base conversion rates for all preferences: with dupes.
Hugo van der Merwe [Thu, 19 Mar 2020 00:42:25 +0000 (01:42 +0100)]
WIP: Add base conversion rates for all preferences: with dupes.

4 years agoMove wip_units_resource_loader.* code into unitsrouter.*
Hugo van der Merwe [Wed, 18 Mar 2020 17:34:38 +0000 (18:34 +0100)]
Move wip_units_resource_loader.* code into unitsrouter.*

4 years agoDelete old wip_units_resources code.
Hugo van der Merwe [Wed, 18 Mar 2020 16:21:02 +0000 (17:21 +0100)]
Delete old wip_units_resources code.

4 years agoMerge remote-tracking branch 'younies/units_router' into wip_younies_units_router_res...
Hugo van der Merwe [Wed, 18 Mar 2020 17:57:27 +0000 (18:57 +0100)]
Merge remote-tracking branch 'younies/units_router' into wip_younies_units_router_resources

4 years agoWorking parsing and returning of units data.
Hugo van der Merwe [Wed, 18 Mar 2020 15:47:46 +0000 (16:47 +0100)]
Working parsing and returning of units data.

4 years agoWIP: c-style ures_* handling.
Hugo van der Merwe [Tue, 17 Mar 2020 21:31:59 +0000 (22:31 +0100)]
WIP: c-style ures_* handling.

4 years agoMerge branch 'units-staging' of github.com:sffc/icu into tryingdouble
Younies Mahmoud [Wed, 18 Mar 2020 13:39:41 +0000 (14:39 +0100)]
Merge branch 'units-staging' of github.com:sffc/icu into tryingdouble

4 years agoaddress Shane's comments2
Younies Mahmoud [Tue, 17 Mar 2020 22:55:39 +0000 (23:55 +0100)]
address Shane's comments2

4 years agoadd another constructor to ComplexUnitConverter
Younies Mahmoud [Tue, 17 Mar 2020 20:47:53 +0000 (21:47 +0100)]
add another constructor to ComplexUnitConverter

4 years agoMerge branch 'units-staging' of github.com:sffc/icu into units_router
Younies Mahmoud [Tue, 17 Mar 2020 20:31:54 +0000 (21:31 +0100)]
Merge branch 'units-staging' of github.com:sffc/icu into units_router

4 years agoMerge pull request #26 from hugovdm/units-staging-preferences
Shane F. Carr [Tue, 17 Mar 2020 03:12:04 +0000 (22:12 -0500)]
Merge pull request #26 from hugovdm/units-staging-preferences

Parse unitPreferencesTest.txt preparing to run data-driven tests

4 years agoimplement units router
Younies Mahmoud [Tue, 17 Mar 2020 00:08:57 +0000 (01:08 +0100)]
implement units router

4 years agoImplement complex unit converter
Younies Mahmoud [Mon, 16 Mar 2020 21:33:09 +0000 (22:33 +0100)]
Implement complex unit converter

4 years agoMerge branch 'tryingdouble' of github.com:younies/icu into units_router
Younies Mahmoud [Mon, 16 Mar 2020 18:40:41 +0000 (19:40 +0100)]
Merge branch 'tryingdouble' of github.com:younies/icu into units_router

4 years agoRemove two unused variables.
Hugo van der Merwe [Mon, 16 Mar 2020 11:00:57 +0000 (12:00 +0100)]
Remove two unused variables.

4 years agoUse a toDebugString that returns a std::string for simplicity.
Hugo van der Merwe [Mon, 16 Mar 2020 10:33:56 +0000 (11:33 +0100)]
Use a toDebugString that returns a std::string for simplicity.

4 years agoICU-Style: use UErrorCode& parameter instead of returning UBool.
Hugo van der Merwe [Mon, 16 Mar 2020 09:59:43 +0000 (10:59 +0100)]
ICU-Style: use UErrorCode& parameter instead of returning UBool.

4 years agoaddress Shane's comments
Younies Mahmoud [Sun, 15 Mar 2020 22:48:34 +0000 (23:48 +0100)]
address Shane's comments

4 years agoMerge branch 'units-staging' of github.com:sffc/icu into tryingdouble
Younies Mahmoud [Sun, 15 Mar 2020 22:38:44 +0000 (23:38 +0100)]
Merge branch 'units-staging' of github.com:sffc/icu into tryingdouble

4 years agoMerge branch 'unit-id' into units-staging
Shane Carr [Sun, 15 Mar 2020 22:10:54 +0000 (15:10 -0700)]
Merge branch 'unit-id' into units-staging

4 years agoFix compile error
Shane Carr [Sun, 15 Mar 2020 22:10:27 +0000 (15:10 -0700)]
Fix compile error

4 years agomerget units staging branch
Younies Mahmoud [Sun, 15 Mar 2020 21:54:29 +0000 (22:54 +0100)]
merget units staging branch

4 years agoaddress Shane's comments
Younies Mahmoud [Sun, 15 Mar 2020 21:49:14 +0000 (22:49 +0100)]
address Shane's comments

4 years agoMerge branch 'unit-id' into units-staging
Shane F. Carr [Fri, 13 Mar 2020 23:06:04 +0000 (18:06 -0500)]
Merge branch 'unit-id' into units-staging

4 years agoMerge remote-tracking branch 'upstream/master' into unit-id
Shane F. Carr [Fri, 13 Mar 2020 23:05:31 +0000 (18:05 -0500)]
Merge remote-tracking branch 'upstream/master' into unit-id

4 years agoTouch-ups to the API surface
Shane F. Carr [Fri, 13 Mar 2020 23:03:59 +0000 (18:03 -0500)]
Touch-ups to the API surface

4 years agoMerge branch 'master' into units-staging
Shane Carr [Fri, 13 Mar 2020 19:06:17 +0000 (12:06 -0700)]
Merge branch 'master' into units-staging

4 years agoICU-20987 integrate CLDR release-37-alpha3 to master, adjust MeasureUnitTest.java...
Peter Edberg [Fri, 13 Mar 2020 03:19:25 +0000 (20:19 -0700)]
ICU-20987 integrate CLDR release-37-alpha3 to master, adjust MeasureUnitTest.java tools

4 years agoadd units router
Younies Mahmoud [Fri, 13 Mar 2020 16:26:20 +0000 (17:26 +0100)]
add units router

4 years agoMake compound parsing work.
Hugo van der Merwe [Thu, 12 Mar 2020 17:34:25 +0000 (18:34 +0100)]
Make compound parsing work.

4 years agoClone parsePreferencesTests from u_parseDelimitedFile (w/ minor mods)
Hugo van der Merwe [Thu, 12 Mar 2020 17:36:27 +0000 (18:36 +0100)]
Clone parsePreferencesTests from u_parseDelimitedFile (w/ minor mods)

4 years agoRead unitPreferencesTest.txt, preparing to test thresholds.
Hugo van der Merwe [Thu, 12 Mar 2020 17:39:42 +0000 (18:39 +0100)]
Read unitPreferencesTest.txt, preparing to test thresholds.

4 years agoTemporarily disable unitPreferencesTest.txt tests with unsupported identifiers.
Hugo van der Merwe [Fri, 6 Mar 2020 14:54:03 +0000 (15:54 +0100)]
Temporarily disable unitPreferencesTest.txt tests with unsupported identifiers.

4 years agoMerge pull request #28 from hugovdm/units-staging-unitquantities
Shane F. Carr [Fri, 13 Mar 2020 08:01:12 +0000 (03:01 -0500)]
Merge pull request #28 from hugovdm/units-staging-unitquantities

Add unitQuantities ldml2icu rules, update units.txt

4 years agoUpdate measunit_impl.h
Shane F. Carr [Fri, 13 Mar 2020 04:24:38 +0000 (23:24 -0500)]
Update measunit_impl.h

4 years agoMerge branch 'master' into units-staging
Shane Carr [Fri, 13 Mar 2020 04:15:44 +0000 (21:15 -0700)]
Merge branch 'master' into units-staging

Conflicts:
icu4c/source/data/misc/supplementalData.txt

4 years agoMerge pull request #25 from hugovdm/units-staging-reformat
Shane F. Carr [Fri, 13 Mar 2020 03:52:42 +0000 (22:52 -0500)]
Merge pull request #25 from hugovdm/units-staging-reformat

No-op/cosmetic: reformat with clang-format ident:4 line-length:105.

4 years agoAdd unitQuantities rules and output to units.txt
Hugo van der Merwe [Thu, 12 Mar 2020 20:24:05 +0000 (21:24 +0100)]
Add unitQuantities rules and output to units.txt

4 years agoldml2icu: add approximate constants, without including 'approximate' annotation.
Hugo van der Merwe [Thu, 12 Mar 2020 19:43:33 +0000 (20:43 +0100)]
ldml2icu: add approximate constants, without including 'approximate' annotation.

4 years agoUpdate constants and preferences using existing ldml2icu rules.
Hugo van der Merwe [Thu, 12 Mar 2020 19:42:27 +0000 (20:42 +0100)]
Update constants and preferences using existing ldml2icu rules.

4 years agoNo-op/cosmetic: reformat with clang-format ident:4 line-length:105.
Hugo van der Merwe [Thu, 12 Mar 2020 16:49:12 +0000 (17:49 +0100)]
No-op/cosmetic: reformat with clang-format ident:4 line-length:105.

I've got two exceptions in this whole-file reformat: I'm not
reformatting testConvert, such that
https://github.com/sffc/icu/pull/21 should merge or rebase more
easily.

4 years agoICU-20809 Remove FieldPositionIterator from listformatter.h
Shane F. Carr [Tue, 10 Mar 2020 02:33:51 +0000 (21:33 -0500)]
ICU-20809 Remove FieldPositionIterator from listformatter.h

4 years agoICU-21011 Debug print detail size of brk files.
Frank Tang [Tue, 10 Mar 2020 20:26:46 +0000 (13:26 -0700)]
ICU-21011 Debug print detail size of brk files.

To print it,
$ CXXFLAGS="-DRBBI_DEBUG" ./runConfigureICU --enable-debug --disable-release  Linux/gcc --disable-layoutex
$ make clean
$ U_RBBIDEBUG="size" make

4 years agoUnit Converter for review
Younies Mahmoud [Wed, 11 Mar 2020 17:46:33 +0000 (18:46 +0100)]
Unit Converter for review

4 years agoICU-20879 fix typo in tests, calender → calendar
Peter Edberg [Tue, 10 Mar 2020 18:05:55 +0000 (11:05 -0700)]
ICU-20879 fix typo in tests, calender → calendar

4 years agoICU-20700 uloc_acceptLanguage API doc update
Markus Scherer [Sun, 8 Mar 2020 15:28:13 +0000 (08:28 -0700)]
ICU-20700 uloc_acceptLanguage API doc update

4 years agoICU-20936 add LocaleMatcher.Builder.setDirection(with-one-way vs. only-two-way)
Markus Scherer [Mon, 9 Mar 2020 23:57:23 +0000 (16:57 -0700)]
ICU-20936 add LocaleMatcher.Builder.setDirection(with-one-way vs. only-two-way)

4 years agodeal with reciprocal
Younies Mahmoud [Tue, 10 Mar 2020 12:48:04 +0000 (13:48 +0100)]
deal with reciprocal

4 years agoICU-20844 ICU4J, reduce restriction on minInt=minFrac=0
Peter Edberg [Tue, 10 Mar 2020 03:44:43 +0000 (20:44 -0700)]
ICU-20844 ICU4J, reduce restriction on minInt=minFrac=0

4 years agoICU-21006 Improve output from RBBI Monkey Test in ICU4J
Frank Tang [Mon, 9 Mar 2020 16:36:52 +0000 (16:36 +0000)]
ICU-21006 Improve output from RBBI Monkey Test in ICU4J

See #1023

4 years agoICU-20975 update KEYS
Steven R. Loomis [Fri, 28 Feb 2020 20:48:12 +0000 (12:48 -0800)]
ICU-20975 update KEYS

- add new key 4569BBC09DA846FC91CBD21CE1BBA44593CF2AE0

4 years agoICU-20626 Update Readme badges to add CI-Valgrind pipeline
Jeff Genovy [Mon, 9 Mar 2020 18:21:38 +0000 (11:21 -0700)]
ICU-20626 Update Readme badges to add CI-Valgrind pipeline

4 years agoICU-20626 Remove "pr:none" from Valgrind CI config to enable comment triggers.
Jeff Genovy [Mon, 9 Mar 2020 19:10:15 +0000 (12:10 -0700)]
ICU-20626 Remove "pr:none" from Valgrind CI config to enable comment triggers.

It seems that having "pr:none" completely disables running on PRs, even
when explicitly triggered by a comment.

4 years agoICU-20965 Remove VS2015 from CI builds, no longer supported by Azure Pipelines
Jeff Genovy [Mon, 9 Mar 2020 18:52:13 +0000 (11:52 -0700)]
ICU-20965 Remove VS2015 from CI builds, no longer supported by Azure Pipelines

4 years agomerge sffc units-staging branch
Younies Mahmoud [Mon, 9 Mar 2020 19:27:40 +0000 (20:27 +0100)]
merge sffc units-staging branch

4 years agostart dealing with reciprocal
Younies Mahmoud [Mon, 9 Mar 2020 19:15:01 +0000 (20:15 +0100)]
start dealing with reciprocal

4 years agoICU-20945 Making icudt66.dll for x64 as PE32+
shaobero [Thu, 27 Feb 2020 07:20:52 +0000 (12:50 +0530)]
ICU-20945 Making icudt66.dll for x64 as PE32+

4 years agoICU-20626 Adding valgrind to the CI tests for ICU4C.
Jeff Genovy [Mon, 9 Mar 2020 07:38:51 +0000 (00:38 -0700)]
ICU-20626 Adding valgrind to the CI tests for ICU4C.

This adds a separate CI pipeline for running valgrind on ICU4C.

The Azure Pipeline images don't have valgrind installed by default though,
so we need to install valgrind first.

We also add `--error-exitcode=1` to the valgrind options, so that any
errors found by valgrind will fail the CI build.

4 years agoICU-20700 reimplement acceptLanguage() using the LocaleMatcher; replace older accept...
Markus Scherer [Sat, 7 Mar 2020 01:23:17 +0000 (17:23 -0800)]
ICU-20700 reimplement acceptLanguage() using the LocaleMatcher; replace older accept-language-string parsing by LocalePriorityList

4 years agoICU-20915 LocaleMatcher no match: always getSupportedIndex()=-1; remove defaultLocale...
Markus Scherer [Thu, 5 Mar 2020 23:03:42 +0000 (15:03 -0800)]
ICU-20915 LocaleMatcher no match: always getSupportedIndex()=-1; remove defaultLocaleIndex field; constructor check if locales are equivalent to default, not just equal; simplify locale sorting; minor builder & test deflaking

4 years agoICU-20991 Trace BreakIterator/BreakEngine creation
Frank Tang [Fri, 6 Mar 2020 19:17:02 +0000 (19:17 +0000)]
ICU-20991 Trace BreakIterator/BreakEngine creation

See #1014

4 years agoMerge pull request #20 from hugovdm/units-staging
Shane F. Carr [Fri, 6 Mar 2020 18:18:58 +0000 (10:18 -0800)]
Merge pull request #20 from hugovdm/units-staging

ICU-20568 Read unitsTest.txt, prepare to run unit tests.

4 years agoReview: use errCode.errIfFailureAndReset.
Hugo van der Merwe [Fri, 6 Mar 2020 13:41:52 +0000 (14:41 +0100)]
Review: use errCode.errIfFailureAndReset.

4 years agoICU-20974 Fix exhaustive test failures
Shane F. Carr [Fri, 6 Mar 2020 06:16:02 +0000 (22:16 -0800)]
ICU-20974 Fix exhaustive test failures

4 years agoICU-21000 Fix abort called by DateTimePatternGenerator::getDefaultHourCycle
Jeff Genovy [Thu, 5 Mar 2020 22:33:13 +0000 (14:33 -0800)]
ICU-21000 Fix abort called by DateTimePatternGenerator::getDefaultHourCycle

If you call the API getDefaultHourCycle on an empty DateTimePatternGenerator
instance (ie: no locale) then it calls UPRV_UNREACHABLE which calls abort().
We should return an error code instead of aborting.

4 years agoICU-21001 Fixing problems found by running valgrind.
Jeff Genovy [Tue, 3 Mar 2020 08:44:59 +0000 (00:44 -0800)]
ICU-21001 Fixing problems found by running valgrind.

This makes fixes in order to run the icu4c tests (intltest, cintltst,
iotest, and icuinfo) cleanly under valgrind with --leak-check=full.

4 years agoICU-21004 Fix buffer over-read in ucal_open
Jeff Genovy [Mon, 2 Mar 2020 00:31:55 +0000 (16:31 -0800)]
ICU-21004 Fix buffer over-read in ucal_open

The issue shows under valgrind or as an Address Sanitizer failure.

4 years agoICU-20974 Correctly handle extreme values of double.
Shane Carr [Sat, 15 Feb 2020 02:24:14 +0000 (18:24 -0800)]
ICU-20974 Correctly handle extreme values of double.

4 years agoICU-20967 add millisecond to DateIntervalFormat
Frank Tang [Sat, 22 Feb 2020 01:41:58 +0000 (01:41 +0000)]
ICU-20967 add millisecond to DateIntervalFormat

See #978

4 years agoTemporarily disable unitsTest.txt tests with unsupported identifiers.
Hugo van der Merwe [Thu, 5 Mar 2020 15:34:18 +0000 (16:34 +0100)]
Temporarily disable unitsTest.txt tests with unsupported identifiers.

4 years agoRead and fprintf unitsTest.txt data-driven unit tests
Hugo van der Merwe [Thu, 5 Mar 2020 15:34:03 +0000 (16:34 +0100)]
Read and fprintf unitsTest.txt data-driven unit tests

4 years agoUpdate testdata/units/* to CLDR commit 19daf508 dated 2020-02-29.
Hugo van der Merwe [Thu, 5 Mar 2020 15:33:49 +0000 (16:33 +0100)]
Update testdata/units/* to CLDR commit 19daf508 dated 2020-02-29.

4 years agoDescribe origins of testdata/units/* in top-of-file comments.
Hugo van der Merwe [Thu, 5 Mar 2020 15:33:33 +0000 (16:33 +0100)]
Describe origins of testdata/units/* in top-of-file comments.

4 years agoPristine copy of CLDR's common/testData/units/*
Hugo van der Merwe [Thu, 5 Mar 2020 15:33:08 +0000 (16:33 +0100)]
Pristine copy of CLDR's common/testData/units/*

4 years agoICU-20961 Return correct currency plural pattern from DecimalFormat
Shane Carr [Sat, 15 Feb 2020 03:18:43 +0000 (19:18 -0800)]
ICU-20961 Return correct currency plural pattern from DecimalFormat

4 years agoICU-21003 Fix CI config to use new Git LFS syntax, add timeout to ICU4J exhaustive...
Jeff Genovy [Tue, 3 Mar 2020 08:30:41 +0000 (00:30 -0800)]
ICU-21003 Fix CI config to use new Git LFS syntax, add timeout to ICU4J exhaustive test

4 years agoICU-20987 integrate CLDR release-37-alpha2 to master (new tools)
Peter Edberg [Tue, 3 Mar 2020 06:01:10 +0000 (22:01 -0800)]
ICU-20987 integrate CLDR release-37-alpha2 to master (new tools)

4 years agoICU-20987 integrate CLDR release-37-alpha1 to master (using new tooling)
Peter Edberg [Thu, 27 Feb 2020 20:10:19 +0000 (12:10 -0800)]
ICU-20987 integrate CLDR release-37-alpha1 to master (using new tooling)

4 years agoall test cases have been passed
Younies [Wed, 26 Feb 2020 10:47:07 +0000 (11:47 +0100)]
all test cases have been passed

4 years agoMerge pull request #19 from hugovdm/units-staging
Shane F. Carr [Tue, 25 Feb 2020 21:56:21 +0000 (13:56 -0800)]
Merge pull request #19 from hugovdm/units-staging

ICU-20568 Fix sorting of unitPreferenceData rules: units.xml

4 years agoICU-20568 Fix sorting of unitPreferenceData rules: units.xml
Hugo van der Merwe [Tue, 25 Feb 2020 21:49:48 +0000 (22:49 +0100)]
ICU-20568 Fix sorting of unitPreferenceData rules: units.xml

4 years agoMerge pull request #18 from hugovdm/units-staging-unitprefs
Shane F. Carr [Tue, 25 Feb 2020 21:17:56 +0000 (13:17 -0800)]
Merge pull request #18 from hugovdm/units-staging-unitprefs

ICU-20568 add unitPreferenceData to units.txt via ldml2icu rules.