aboutsummaryrefslogtreecommitdiffstats
path: root/tests/string_test.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-02-18 21:29:13 -0800
committerElliott Hughes <enh@google.com>2015-02-18 22:02:56 -0800
commit3cfb52aab2548df635e9672218cc433e14922fd3 (patch)
treeeebbf162a1e5e1ed8726a9129ea17a410ebaa3ed /tests/string_test.cpp
parent3e1b5f46c07aef5983ecf2feb1c3369b2cd200c0 (diff)
downloadandroid_bionic-3cfb52aab2548df635e9672218cc433e14922fd3.tar.gz
android_bionic-3cfb52aab2548df635e9672218cc433e14922fd3.tar.bz2
android_bionic-3cfb52aab2548df635e9672218cc433e14922fd3.zip
Add GNU extensions mempcpy and wmemcpy.
Used by elfutils. On the bright side, they stopped using __mempcpy. Bug: 18374026 Change-Id: Id29bbe6ef1c5ed5a171bb6c32182f129d8332abb
Diffstat (limited to 'tests/string_test.cpp')
-rw-r--r--tests/string_test.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/string_test.cpp b/tests/string_test.cpp
index 66cf848c9..1d63c7668 100644
--- a/tests/string_test.cpp
+++ b/tests/string_test.cpp
@@ -1395,3 +1395,8 @@ TEST(string, strnlen_147048) {
EXPECT_EQ(0U, strnlen(heap_src, 1024*1024*1024));
delete[] heap_src;
}
+
+TEST(string, mempcpy) {
+ char dst[6];
+ ASSERT_EQ(&dst[4], reinterpret_cast<char*>(mempcpy(dst, "hello", 4)));
+}