From 096060586184f0ff91a549511b3b1f53f3a307fd Mon Sep 17 00:00:00 2001 From: chuaizhzh Date: Fri, 30 Apr 2021 16:18:52 +0800 Subject: [PATCH] fix failed restcase Change-Id: I4d78d98007b192dc835fc10d4622a5f69ac360d8 --- kernel_lite/io_posix/src/IoTestWchar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel_lite/io_posix/src/IoTestWchar.cpp b/kernel_lite/io_posix/src/IoTestWchar.cpp index 94c2f2ae4..c2edd6951 100755 --- a/kernel_lite/io_posix/src/IoTestWchar.cpp +++ b/kernel_lite/io_posix/src/IoTestWchar.cpp @@ -246,11 +246,11 @@ HWTEST_F(IoTest, testWmemset, Function | MediumTest | Level1) HWTEST_F(IoTest, testWmemchr, Function | MediumTest | Level1) { wchar_t src[] = L"hello world"; - wchar_t *ret = wmemchr(src, L' ', sizeof(src)); + wchar_t *ret = wmemchr(src, L' ', sizeof(src) / sizeof(src[0]) - 1); EXPECT_STREQ(ret, L" world"); wchar_t srcT[] = L"this is string"; - ret = wmemchr(srcT, L'?', sizeof(srcT)); + ret = wmemchr(srcT, L'?', sizeof(srcT) / sizeof(srcT[0]) - 1); EXPECT_STREQ(ret, nullptr); } -- GitLab