Skip to content

Commit b315e8a

Browse files
committed
std.cfg: Added more tests for wmemmove() and wmemset().
1 parent 6a0fb05 commit b315e8a

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

test/cfg/std.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3664,6 +3664,22 @@ void nullPointer_wmemcmp(const wchar_t* s1, const wchar_t* s2, size_t n)
36643664
(void)wmemcmp(s1,s2,n);
36653665
}
36663666

3667+
void nullPointer_wmemmove(wchar_t* s1, const wchar_t* s2, size_t n)
3668+
{
3669+
// cppcheck-suppress nullPointer
3670+
(void)wmemmove(NULL,s2,n);
3671+
// cppcheck-suppress nullPointer
3672+
(void)wmemmove(s1,NULL,n);
3673+
(void)wmemmove(s1,s2,n);
3674+
}
3675+
3676+
void nullPointer_wmemset(wchar_t* s, wchar_t c, size_t n)
3677+
{
3678+
// cppcheck-suppress nullPointer
3679+
(void)wmemset(NULL,c,n);
3680+
(void)wmemset(s,c,n);
3681+
}
3682+
36673683
void nullPointer_memmove(void *s1, void *s2, size_t n)
36683684
{
36693685
// cppcheck-suppress nullPointer

test/cfg/std.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3619,6 +3619,22 @@ void nullPointer_memmove(void *s1, void *s2, size_t n)
36193619
(void)std::memmove(s1,s2,n);
36203620
}
36213621

3622+
void nullPointer_wmemmove(wchar_t* s1, const wchar_t* s2, size_t n)
3623+
{
3624+
// cppcheck-suppress nullPointer
3625+
(void)std::wmemmove(NULL,s2,n);
3626+
// cppcheck-suppress nullPointer
3627+
(void)std::wmemmove(s1,NULL,n);
3628+
(void)std::wmemmove(s1,s2,n);
3629+
}
3630+
3631+
void nullPointer_wmemset(wchar_t* s, wchar_t c, size_t n)
3632+
{
3633+
// cppcheck-suppress nullPointer
3634+
(void)std::wmemset(NULL,c,n);
3635+
(void)std::wmemset(s,c,n);
3636+
}
3637+
36223638
///////////////////////////////////////////////////////////////////////
36233639
// <algorithm>
36243640
///////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)