aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/string_test.cpp5
-rw-r--r--tests/wchar_test.cpp5
2 files changed, 10 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)));
+}
diff --git a/tests/wchar_test.cpp b/tests/wchar_test.cpp
index a1d150117..e86d56dc0 100644
--- a/tests/wchar_test.cpp
+++ b/tests/wchar_test.cpp
@@ -667,3 +667,8 @@ TEST(wchar, wcstoull_l_EINVAL) {
wcstoull_l(L"123", NULL, 37, LC_GLOBAL_LOCALE);
ASSERT_EQ(EINVAL, errno);
}
+
+TEST(wchar, wmempcpy) {
+ wchar_t dst[6];
+ ASSERT_EQ(&dst[4], wmempcpy(dst, L"hello", 4));
+}