Repository navigation
ICU-20991 Trace BreakIterator/BreakEngine creation - #1014
Conversation
|
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
sffc
left a comment
There was a problem hiding this comment.
Looks pretty good! Just one comment and a question
|
FYI: The clang asan Travis build is apparently hitting a heap-buffer-overflow failure with the changes somehow... |
sffc
left a comment
There was a problem hiding this comment.
Looks like removing the u_cleanup fixed the tests.
|
|
||
| assertEquals("utrace_entry should be called ", UTRACE_UBRK_CREATE_WORD, gEntryFn[0]); | ||
| assertEquals("utrace_exit should be called ", UTRACE_UBRK_CREATE_WORD, gExitFn[0]); | ||
| stringStream << "utrace_entry got called " << gEntryFn.size() << " times\n" |
There was a problem hiding this comment.
When someone in the future tries to read this test, it won't be clear what was the expected result. They'll get a bunch of output, but it's not clear what the output was supposed to be.
Suggestion: How about making a little function assertEqualsOptional that uses logln instead of errln when the arguments don't match? Then your code is still readable. You could put the function either here or in intltest.cpp.
There was a problem hiding this comment.
It will be confusing to setup expectation without calling a clean up in front. I now hook up to the rbbi clean up only from test and see will that help.
Indeed, I suspect a test was likely holding a pointer to something that got cleaned-up. Thanks! |
|
LGTM; wait for the tests to come back, then please squash. (I requested a re-build of AppVeyor) |
|
PTAL calling rbbi_cleanup() instead of u_cleanup() does address the heap-buffer-overflow failure issue. |
|
LGTM please squash. The AppVeyor failure looks like a flake. |
|
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
Extend utrace enum to trace BreakIterator instance and internal language break engine
Checklist