c2527073c2
This CL added additional tests for converting between utf16 and utf8, specifically tests that: 1. check utf16_to_utf8_length() returns 0 if input is an empty UTF16 string 2. check utf16_to_utf8_length() returns 1 if input is a single ASCII character UTF16 string 3. check utf16_to_utf8_length() returns 3 if input is a single UTF-16 character between U+0800 - U+FFFF 4. check utf16_to_utf8_length() returns 4 if input has a surrogate pair 5. check unpaired UTF-16 surrogate is handled correctly (skipped) 6. check utf16_to_utf8_length(0 handles invalid surrogate case correctly, by skipping the first but handling the rest correctly 7. check a normal string with a mix of 1/2/3/4-byte UTF8 characters is correctly converted by utf16_to_utf8() 8. check conversion from invalid utf8 sequence with invalid leading byte and/or invalid trailing byte(s) should still work and not crash Change-Id: If68e514af0e84ddebf5900b2e140e76ba4f44553 |
||
---|---|---|
.. | ||
include/utils | ||
Android.bp | ||
BitSet_fuzz.cpp | ||
BitSet_test.cpp | ||
CallStack.cpp | ||
CallStack_fuzz.cpp | ||
CallStack_test.cpp | ||
CleanSpec.mk | ||
Errors.cpp | ||
Errors_test.cpp | ||
FileMap.cpp | ||
FileMap_fuzz.cpp | ||
FileMap_test.cpp | ||
FuzzFormatTypes.h | ||
JenkinsHash.cpp | ||
LightRefBase.cpp | ||
Looper.cpp | ||
Looper_fuzz.cpp | ||
Looper_test.cpp | ||
Looper_test_pipe.h | ||
LruCache_fuzz.cpp | ||
LruCache_test.cpp | ||
misc.cpp | ||
MODULE_LICENSE_APACHE2 | ||
Mutex_test.cpp | ||
NativeHandle.cpp | ||
NOTICE | ||
OWNERS | ||
Printer.cpp | ||
Printer_fuzz.cpp | ||
ProcessCallStack.cpp | ||
ProcessCallStack_fuzz.cpp | ||
RefBase.cpp | ||
RefBase_fuzz.cpp | ||
RefBase_test.cpp | ||
SharedBuffer.cpp | ||
SharedBuffer.h | ||
SharedBuffer_test.cpp | ||
Singleton_test.cpp | ||
Singleton_test.h | ||
Singleton_test1.cpp | ||
Singleton_test2.cpp | ||
StopWatch.cpp | ||
String8.cpp | ||
String8_fuzz.cpp | ||
String8_test.cpp | ||
String16.cpp | ||
String16_fuzz.cpp | ||
String16_test.cpp | ||
StrongPointer.cpp | ||
StrongPointer_test.cpp | ||
SystemClock.cpp | ||
SystemClock_test.cpp | ||
TEST_MAPPING | ||
Threads.cpp | ||
Timers.cpp | ||
Timers_test.cpp | ||
Tokenizer.cpp | ||
Trace.cpp | ||
Unicode.cpp | ||
Unicode_test.cpp | ||
Vector_benchmark.cpp | ||
Vector_fuzz.cpp | ||
Vector_test.cpp | ||
VectorImpl.cpp |