summaryrefslogtreecommitdiff
path: root/libutils/tests/Unicode_test.cpp
AgeCommit message (Collapse)Author
2019-02-11Clean up libcutils/libutils tests.Elliott Hughes
Move tests in the same directory as the corresponding code, so it's easier to see what is/isn't tested. Fix naming of libcutils_tests (plural) to match the singular that's more common (even though the plural makes more sense to me). Add these two to system/core/'s TEST_MAPPING. Remove obsolete AndroidTest.xml. Fix a flaky (timing-dependent) libcutils test. Test: ran tests Change-Id: I7e0a31ff45c8a152562bf66fc97161594249366e
2017-10-24libutils: Fix bug in strstr16.Branislav Rankov
In the original code when target is an empty string strlen16() would start reading the memory until a "terminating null" (that is, zero) character is found. This may happen because "*target++", at line 300, would increment the pointer beyond the actual string. Signed-off-by: Branislav Rankov <branislav.rankov@arm.com> Signed-off-by: Tamas Petz <tamas.petz@arm.com> Test: libutils_tests --gtest_filter=UnicodeTest.strstr16* Change-Id: I213ffe061057c7fa8f34b68881e106a709557dcd
2016-08-02Unicode: specify destination length in utf8_to_utf16 methodsSergio Giro
String16(const char *utf8) now returns the empty string in case a string ends halfway throw a utf8 character. Bug: 29267949 Change-Id: I5223caa7d42f4582a982609a898a02043265c6d3
2016-05-09Add String16#contains and strstr16 methods.Michael Wright
These are needed for aapt to find javadoc comments that contain "@removed" in order to skip them when printing styleable docs. Bug: 28663748 Change-Id: I8866d2167c41e11d6c2586da369560d5815fd13e
2013-08-02move libs/utils to libutilsAlex Ray
Change-Id: I6cf4268599460791414882f91eeb88a992fbd29d