summaryrefslogtreecommitdiffstats
path: root/tests/wchar_test.cpp
diff options
context:
space:
mode:
authorBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2014-05-23 17:44:18 +0200
committerChristopher Ferris <cferris@google.com>2014-05-23 17:54:08 -0700
commit8167dd7cb98e87ffe9b40e4993c330b244ca2234 (patch)
tree8800a876d9c8866a1e76f890254d7a22d8281bfb /tests/wchar_test.cpp
parenta486632e789c6db4c35f969485ebb57f503bcf48 (diff)
downloadbionic-8167dd7cb98e87ffe9b40e4993c330b244ca2234.tar.gz
bionic-8167dd7cb98e87ffe9b40e4993c330b244ca2234.tar.bz2
bionic-8167dd7cb98e87ffe9b40e4993c330b244ca2234.zip
Add optimized AArch64 versions of bcopy and wmemmove based on memmove
Add optimized versions of bcopy and wmemmove for AArch64 based on the memmove implementation Change-Id: Ie43d0ff4f8ec4edba5b4fb5ccacd941f81ac6557 Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Diffstat (limited to 'tests/wchar_test.cpp')
-rw-r--r--tests/wchar_test.cpp11
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);
+}