diff options
| author | jvoisin | 2023-03-18 13:29:22 +0100 |
|---|---|---|
| committer | jvoisin | 2023-04-13 23:49:02 +0200 |
| commit | 4f1380a48da7cb0375810f70e68ca6282486dec1 (patch) | |
| tree | 2f98c995017e7f52b30b71ca35990f036f56cc19 /tests/test_memcpy_static_read.c | |
| parent | 3e6704d0be707487d7a9dccfdc75203c7261e11b (diff) | |
Add a basic testsuite
Diffstat (limited to 'tests/test_memcpy_static_read.c')
| -rw-r--r-- | tests/test_memcpy_static_read.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_memcpy_static_read.c b/tests/test_memcpy_static_read.c new file mode 100644 index 0000000..fed67a8 --- /dev/null +++ b/tests/test_memcpy_static_read.c | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #include "common.h" | ||
| 2 | |||
| 3 | #include <string.h> | ||
| 4 | |||
| 5 | int main(int argc, char** argv) { | ||
| 6 | char buffer[8] = {0}; | ||
| 7 | memcpy(buffer, "123456", 4); | ||
| 8 | puts(buffer); | ||
| 9 | |||
| 10 | CHK_FAIL_START | ||
| 11 | memcpy(buffer, "123456", sizeof(buffer)); | ||
| 12 | CHK_FAIL_END | ||
| 13 | |||
| 14 | puts(buffer); | ||
| 15 | return ret; | ||
| 16 | } | ||
