summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/Makefile2
-rw-r--r--tests/test_wmemset_dynamic.c14
-rw-r--r--tests/test_wmemset_static.c14
3 files changed, 30 insertions, 0 deletions
diff --git a/tests/Makefile b/tests/Makefile
index be379cd..1f92b36 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -37,6 +37,8 @@ TARGETS= \
37 test_mbsrtowcs_static \ 37 test_mbsrtowcs_static \
38 test_mbstowcs_dynamic \ 38 test_mbstowcs_dynamic \
39 test_mbstowcs_static \ 39 test_mbstowcs_static \
40 test_wmemset_dynamic \
41 test_wmemset_static \
40 test_memchr_dynamic_read \ 42 test_memchr_dynamic_read \
41 test_memchr_static_read \ 43 test_memchr_static_read \
42 test_memcpy_dynamic_read \ 44 test_memcpy_dynamic_read \
diff --git a/tests/test_wmemset_dynamic.c b/tests/test_wmemset_dynamic.c
new file mode 100644
index 0000000..edcfd63
--- /dev/null
+++ b/tests/test_wmemset_dynamic.c
@@ -0,0 +1,14 @@
1#include "common.h"
2
3#include <wchar.h>
4
5int main(int argc, char** argv) {
6 wchar_t buffer[4] = {0};
7 wmemset(buffer, L'A', 3);
8
9 CHK_FAIL_START
10 wmemset(buffer, L'B', argc);
11 CHK_FAIL_END
12
13 return ret;
14}
diff --git a/tests/test_wmemset_static.c b/tests/test_wmemset_static.c
new file mode 100644
index 0000000..29ea7aa
--- /dev/null
+++ b/tests/test_wmemset_static.c
@@ -0,0 +1,14 @@
1#include "common.h"
2
3#include <wchar.h>
4
5int main(int argc, char** argv) {
6 wchar_t buffer[4] = {0};
7 wmemset(buffer, L'A', 3);
8
9 CHK_FAIL_START
10 wmemset(buffer, L'B', 16);
11 CHK_FAIL_END
12
13 return ret;
14}