Repository navigation
ICU-20673 Allow built-in translit ID w/o data. - #958
Conversation
|
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
|
LGTM. If we wanted to run this test on CI without data, we could do it by modifying the build command here to only run that one test: The data filter would be added here: Also, please make sure there are tests that cover the two patterns that we identified as problematic:
|
|
Please take another look. I added unit tests. I am not sure we should run this test on CI without data or not. |
|
LGTM. I pushed a change to the Azure CI builds config file that should run the test in a no-data environment. Adding @jefgen to review the change to the CI file. |
|
Looks good: |
sffc
left a comment
There was a problem hiding this comment.
Is it worth testing that the actual transliterate methods work without error, not just the constructor? I think at least call the transliterate method, and for bonus points, have input/output cases that test that the output is as expected.
| ] | ||
| }, | ||
| // Test mixed feature filter and resource filter | ||
| // Exlude translit data so we can run that test |
There was a problem hiding this comment.
minor nit: maybe refer to the ticket number (ICU-20673) instead of just "that" so there's a breadcrumb to follow later on for somebody else? :) #Resolved
| const UnicodeString T_PART = UNICODE_STRING_SIMPLE("-t-"); | ||
|
|
||
| int32_t row, maxRows; | ||
| if (U_SUCCESS(status)) { |
There was a problem hiding this comment.
if (U_SUCCESS(status)) { [](start = 4, length = 24)
The code before doesn't really do a great job of checking if the data loading above fails due to out-of-memory (OOM) -- but with the changes to use a local status variable now (lstatus) any OOM failure from ures_open or ures_getByKey would be completely hidden entirely.
Would you mind adding a check to see if lstatus is OOM here?
For example, here's a similar example in another file where a localStatus is used:
https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/numsys.cpp#L153
Perhaps something like this:
if (lstatus == U_MEMORY_ALLOCATION_ERROR) {
delete registry;
registry = nullptr;
status = U_MEMORY_ALLOCATION_ERROR;
return FALSE;
}
``` #Resolved
jefgen
left a comment
There was a problem hiding this comment.
LGTM. Though I didn't thoroughly review all the test cases that you added.
Thanks!
sffc
left a comment
There was a problem hiding this comment.
LGTM, please squash after fixing one nit
eab43ad to
991f877
Compare
|
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
0efe2da to
f099edf
Compare
|
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
Ignore errors while reading root.res by using local status.
Checklist