diff options
author | Christopher Ferris <cferris@google.com> | 2014-05-28 21:35:04 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-05-28 21:35:04 +0000 |
commit | 8a405b027a9c8b3a614016f4824a03fa252e9e1e (patch) | |
tree | 6477f0c0bc3bab543583bc4df2f6a2e2c69a599d /tests/wchar_test.cpp | |
parent | 52f74322b1d72d57146107f32ee2c76c421bf4b1 (diff) | |
parent | 6f2bde344123d8503cd60f3ecd3420f39aa24eb9 (diff) | |
download | android_bionic-8a405b027a9c8b3a614016f4824a03fa252e9e1e.tar.gz android_bionic-8a405b027a9c8b3a614016f4824a03fa252e9e1e.tar.bz2 android_bionic-8a405b027a9c8b3a614016f4824a03fa252e9e1e.zip |
Merge "Add optimized AArch64 versions of bcopy and wmemmove based on memmove"
Diffstat (limited to 'tests/wchar_test.cpp')
-rw-r--r-- | tests/wchar_test.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/wchar_test.cpp b/tests/wchar_test.cpp index 50b860893..5fa5bf992 100644 --- a/tests/wchar_test.cpp +++ b/tests/wchar_test.cpp @@ -442,3 +442,14 @@ TEST(wchar, wcsftime) { EXPECT_EQ(24U, wcsftime(buf, sizeof(buf), L"%c", &t)); EXPECT_STREQ(L"Sun Mar 10 00:00:00 2100", buf); } + +TEST(wchar, wmemmove) { + const wchar_t const_wstr[] = L"This is a test of something or other....."; + wchar_t* wstr = new wchar_t[sizeof(const_wstr)]; + + wmemmove(wstr, const_wstr, sizeof(const_wstr)/sizeof(wchar_t)); + EXPECT_STREQ(const_wstr, wstr); + + wmemmove(wstr+5, wstr, sizeof(const_wstr)/sizeof(wchar_t) - 5); + EXPECT_STREQ(L"This This is a test of something or other.", wstr); +} |