projects
/
taglib
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc38a0e
)
Add a test for unpaired surrogate characters in a UTF-16 string.
author
Tsuda Kageyu
<tsuda.kageyu@gmail.com>
Thu, 26 Jan 2017 08:33:54 +0000
(17:33 +0900)
committer
Tsuda Kageyu
<tsuda.kageyu@gmail.com>
Thu, 26 Jan 2017 08:33:54 +0000
(17:33 +0900)
tests/test_string.cpp
patch
|
blob
|
history
diff --git
a/tests/test_string.cpp
b/tests/test_string.cpp
index 4e3a1ac5381a944b548d047563217143fbf59625..d3661c2471d5c89e1cbf365a6c46fa62cdf00ed3 100644
(file)
--- a/
tests/test_string.cpp
+++ b/
tests/test_string.cpp
@@
-176,6
+176,10
@@
public:
const String s2(v2, String::UTF8);
CPPUNIT_ASSERT_EQUAL(s2.data(String::UTF16), v1);
+
+ const ByteVector v3("\xff\xfe\xb7\xdf\xce\x91\x4b\x5c");
+ const String s3(v2, String::UTF16);
+ CPPUNIT_ASSERT(s3.isEmpty());
}
void testAppendStringDetach()