aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
author2023-05-07 10:44:11 +0530
committer2023-05-07 10:44:11 +0530
commit97a91843ffac0bb3aa42540c6e5d3ddea75af489 (patch)
tree7a26514bef692fd1162f091ff490d456308334a0 /test
parentUpdated Readme to include build instructions (diff)
downloadcart-main.tar
cart-main.tar.gz
cart-main.tar.bz2
cart-main.tar.lz
cart-main.tar.xz
cart-main.tar.zst
cart-main.zip
Added Basic Error codes, Tests and de-inliningmain
Error codes needs to be ingrated with the alloc module Tests now have great coverage in the mem module (>75%). Signed-off-by: Marc Pervaz Boocha <mboocha@sudomsg.xyz> On branch main Your branch is up to date with 'origin/main'. Changes to be committed: modified: include/alloc.h new file: include/err.h modified: include/mem.h modified: include/meson.build modified: readme.md modified: src/alloc/free.c modified: src/alloc/malloc.c new file: src/err/errstr.c new file: src/err/meson.build new file: src/err/set_err.c modified: src/mem/memccpy.c modified: src/mem/memchr.c modified: src/mem/memcmp.c modified: src/mem/memcpy.c modified: src/mem/memlen.c modified: src/mem/memmem.c modified: src/mem/memmove.c modified: src/mem/memrchr.c modified: src/mem/memrev.c modified: src/mem/memset.c modified: src/mem/memswap.c modified: src/mem/memzero.c modified: src/meson.build new file: test/alloc/memdup.c modified: test/alloc/meson.build new file: test/mem/memccpy_nullnull.c new file: test/mem/memchr.c new file: test/mem/memchr_notfound.c new file: test/mem/memcmp_diff.c new file: test/mem/memcmp_prefix.c new file: test/mem/memcmp_same.c new file: test/mem/memcmp_samenull.c new file: test/mem/memcmp_sing.c new file: test/mem/memcpy_null_prefix.c new file: test/mem/memcpy_null_same.c new file: test/mem/memcpy_nullnull.c new file: test/mem/memcpy_prefix.c new file: test/mem/memcpy_same.c new file: test/mem/memlen.c new file: test/mem/memlen_overflow.c new file: test/mem/memmove_backward.c new file: test/mem/memmove_null_backward.c new file: test/mem/memmove_null_overlap.c new file: test/mem/memmove_null_prefix.c new file: test/mem/memmove_null_same.c new file: test/mem/memmove_null_sing.c new file: test/mem/memmove_nullnull.c new file: test/mem/memmove_overlap.c new file: test/mem/memmove_prefix.c new file: test/mem/memmove_same.c new file: test/mem/memmove_sing.c new file: test/mem/memrchr.c new file: test/mem/memrchr_notfound.c new file: test/mem/memrev.c new file: test/mem/memset_null.c new file: test/mem/memset_nullnull.c new file: test/mem/memswap.c new file: test/mem/memswap_null.c new file: test/mem/memswap_same.c new file: test/mem/memzero_null.c new file: test/mem/memzero_nullnull.c modified: test/mem/meson.build modified: test/meson.build
Diffstat (limited to 'test')
-rw-r--r--test/alloc/memdup.c11
-rw-r--r--test/alloc/meson.build3
-rw-r--r--test/mem/memccpy_nullnull.c8
-rw-r--r--test/mem/memchr.c5
-rw-r--r--test/mem/memchr_notfound.c5
-rw-r--r--test/mem/memcmp_diff.c8
-rw-r--r--test/mem/memcmp_prefix.c6
-rw-r--r--test/mem/memcmp_same.c8
-rw-r--r--test/mem/memcmp_samenull.c5
-rw-r--r--test/mem/memcmp_sing.c7
-rw-r--r--test/mem/memcpy_null_prefix.c11
-rw-r--r--test/mem/memcpy_null_same.c9
-rw-r--r--test/mem/memcpy_nullnull.c8
-rw-r--r--test/mem/memcpy_prefix.c11
-rw-r--r--test/mem/memcpy_same.c9
-rw-r--r--test/mem/memlen.c5
-rw-r--r--test/mem/memlen_overflow.c5
-rw-r--r--test/mem/memmove_backward.c10
-rw-r--r--test/mem/memmove_null_backward.c10
-rw-r--r--test/mem/memmove_null_overlap.c13
-rw-r--r--test/mem/memmove_null_prefix.c11
-rw-r--r--test/mem/memmove_null_same.c9
-rw-r--r--test/mem/memmove_null_sing.c8
-rw-r--r--test/mem/memmove_nullnull.c8
-rw-r--r--test/mem/memmove_overlap.c13
-rw-r--r--test/mem/memmove_prefix.c11
-rw-r--r--test/mem/memmove_same.c9
-rw-r--r--test/mem/memmove_sing.c8
-rw-r--r--test/mem/memrchr.c5
-rw-r--r--test/mem/memrchr_notfound.c5
-rw-r--r--test/mem/memrev.c7
-rw-r--r--test/mem/memset_null.c14
-rw-r--r--test/mem/memset_nullnull.c6
-rw-r--r--test/mem/memswap.c11
-rw-r--r--test/mem/memswap_null.c6
-rw-r--r--test/mem/memswap_same.c9
-rw-r--r--test/mem/memzero_null.c14
-rw-r--r--test/mem/memzero_nullnull.c6
-rw-r--r--test/mem/meson.build155
-rw-r--r--test/meson.build2
40 files changed, 467 insertions, 7 deletions
diff --git a/test/alloc/memdup.c b/test/alloc/memdup.c
new file mode 100644
index 0000000..db40146
--- /dev/null
+++ b/test/alloc/memdup.c
@@ -0,0 +1,11 @@
+#include <alloc.h>
+#include <mem.h>
+
+static char const src[] = "hello";
+
+int main(void) {
+ void *dest = calt_memdup(src, sizeof(src));
+ int res = calt_memcmp(src, dest, sizeof(src)) == 0 ? 0 : 1;
+ calt_free(dest);
+ return res;
+}
diff --git a/test/alloc/meson.build b/test/alloc/meson.build
index e69de29..8e8c5cd 100644
--- a/test/alloc/meson.build
+++ b/test/alloc/meson.build
@@ -0,0 +1,3 @@
+test('memdup', executable('memdup', 'memdup.c',
+ dependencies : calt
+))
diff --git a/test/mem/memccpy_nullnull.c b/test/mem/memccpy_nullnull.c
new file mode 100644
index 0000000..629c990
--- /dev/null
+++ b/test/mem/memccpy_nullnull.c
@@ -0,0 +1,8 @@
+#include <mem.h>
+#include <stddef.h>
+
+static char const src[] = "Hello World";
+
+int main(void){
+ return !calt_memccpy_null(NULL, src, 'e' ,sizeof src) ? 0 : 1;
+}
diff --git a/test/mem/memchr.c b/test/mem/memchr.c
new file mode 100644
index 0000000..d3fafaa
--- /dev/null
+++ b/test/mem/memchr.c
@@ -0,0 +1,5 @@
+#include <mem.h>
+
+static char const buf[] = "test";
+
+int main(void) { return calt_memchr(buf, 't', sizeof buf) == &buf[0] ? 0 : 1; }
diff --git a/test/mem/memchr_notfound.c b/test/mem/memchr_notfound.c
new file mode 100644
index 0000000..30c12a3
--- /dev/null
+++ b/test/mem/memchr_notfound.c
@@ -0,0 +1,5 @@
+#include <mem.h>
+
+static char const buf[] = "test";
+
+int main(void) { return calt_memchr(buf, 'u', sizeof buf) == NULL ? 0 : 1; }
diff --git a/test/mem/memcmp_diff.c b/test/mem/memcmp_diff.c
new file mode 100644
index 0000000..2601656
--- /dev/null
+++ b/test/mem/memcmp_diff.c
@@ -0,0 +1,8 @@
+#include <mem.h>
+
+static char const buf1[] = "hello";
+static char const buf2[] = "HELLO";
+
+int main(void) {
+ return calt_memcmp(buf1, buf2, sizeof(buf1)) != 0 ? 0 : 1;
+}
diff --git a/test/mem/memcmp_prefix.c b/test/mem/memcmp_prefix.c
new file mode 100644
index 0000000..175f85d
--- /dev/null
+++ b/test/mem/memcmp_prefix.c
@@ -0,0 +1,6 @@
+#include <mem.h>
+
+char const buf1[] = "hello";
+char const buf2[] = "hello world";
+
+int main(void) { return 0 == calt_memcmp(buf1, buf2, sizeof(buf1) - 1) ? 0 : 1; }
diff --git a/test/mem/memcmp_same.c b/test/mem/memcmp_same.c
new file mode 100644
index 0000000..6881fe7
--- /dev/null
+++ b/test/mem/memcmp_same.c
@@ -0,0 +1,8 @@
+#include <mem.h>
+
+static char const buf1[] = "hello";
+static char const buf2[] = "hello";
+
+int main(void) {
+ return calt_memcmp(buf1, buf2, sizeof(buf1)) == 0 ? 0 : 1;
+}
diff --git a/test/mem/memcmp_samenull.c b/test/mem/memcmp_samenull.c
new file mode 100644
index 0000000..68e00a7
--- /dev/null
+++ b/test/mem/memcmp_samenull.c
@@ -0,0 +1,5 @@
+#include <mem.h>
+
+int main(void) {
+ return calt_memcmp(NULL, NULL, 10) == 0 ? 0 : 1;
+}
diff --git a/test/mem/memcmp_sing.c b/test/mem/memcmp_sing.c
new file mode 100644
index 0000000..0d0800e
--- /dev/null
+++ b/test/mem/memcmp_sing.c
@@ -0,0 +1,7 @@
+#include <mem.h>
+
+static char const buf1[] = "hello";
+
+int main(void) {
+ return calt_memcmp(buf1, buf1, sizeof(buf1)) == 0 ? 0 : 1;
+}
diff --git a/test/mem/memcpy_null_prefix.c b/test/mem/memcpy_null_prefix.c
new file mode 100644
index 0000000..ffb3084
--- /dev/null
+++ b/test/mem/memcpy_null_prefix.c
@@ -0,0 +1,11 @@
+#include <mem.h>
+
+static char const src[] = "hello";
+static char dest[sizeof(src)] = {0};
+
+int main(void) {
+ calt_memcpy_null(dest, src, 3);
+ return calt_memcmp(src, dest, 3) == 0
+ ? calt_memcmp("\0\0\0", dest + 3, 3) == 0 ? 0 : 1
+ : 1;
+}
diff --git a/test/mem/memcpy_null_same.c b/test/mem/memcpy_null_same.c
new file mode 100644
index 0000000..d0b2ae0
--- /dev/null
+++ b/test/mem/memcpy_null_same.c
@@ -0,0 +1,9 @@
+#include <mem.h>
+
+static char const src[] = "hello";
+static char dest[sizeof(src)] = { 0 };
+
+int main(void) {
+ calt_memcpy_null(dest, src, sizeof(src));
+ return calt_memcmp(src, dest, sizeof(src)) == 0 ? 0 : 1;
+}
diff --git a/test/mem/memcpy_nullnull.c b/test/mem/memcpy_nullnull.c
new file mode 100644
index 0000000..30b72f3
--- /dev/null
+++ b/test/mem/memcpy_nullnull.c
@@ -0,0 +1,8 @@
+#include <mem.h>
+#include <stddef.h>
+
+static char const src[] = "Hello World";
+
+int main(void){
+ return !calt_memcpy_null(NULL, src, sizeof src) ? 0 : 1;
+}
diff --git a/test/mem/memcpy_prefix.c b/test/mem/memcpy_prefix.c
new file mode 100644
index 0000000..675f2bc
--- /dev/null
+++ b/test/mem/memcpy_prefix.c
@@ -0,0 +1,11 @@
+#include <mem.h>
+
+static char const src[] = "hello";
+static char dest[sizeof(src)] = {0};
+
+int main(void) {
+ calt_memcpy(dest, src, 3);
+ return calt_memcmp(src, dest, 3) == 0
+ ? calt_memcmp("\0\0\0", dest + 3, 3) == 0 ? 0 : 1
+ : 1;
+}
diff --git a/test/mem/memcpy_same.c b/test/mem/memcpy_same.c
new file mode 100644
index 0000000..3fe9e84
--- /dev/null
+++ b/test/mem/memcpy_same.c
@@ -0,0 +1,9 @@
+#include <mem.h>
+
+static char const src[] = "hello";
+static char dest[sizeof(src)] = { 0 };
+
+int main(void) {
+ calt_memcpy(dest, src, sizeof(src));
+ return calt_memcmp(src, dest, sizeof(src)) == 0 ? 0 : 1;
+}
diff --git a/test/mem/memlen.c b/test/mem/memlen.c
new file mode 100644
index 0000000..1127b2b
--- /dev/null
+++ b/test/mem/memlen.c
@@ -0,0 +1,5 @@
+#include <mem.h>
+
+static char const buf[] = "Test";
+
+int main(void) { return calt_memlen(buf, '\0', sizeof buf) == 4 ? 0 : 1; }
diff --git a/test/mem/memlen_overflow.c b/test/mem/memlen_overflow.c
new file mode 100644
index 0000000..258f2a0
--- /dev/null
+++ b/test/mem/memlen_overflow.c
@@ -0,0 +1,5 @@
+#include <mem.h>
+
+static char const buf[] = "Test";
+
+int main(void) { return calt_memlen(buf, '\0', 3) == 3 ? 0 : 1; }
diff --git a/test/mem/memmove_backward.c b/test/mem/memmove_backward.c
new file mode 100644
index 0000000..5c8d477
--- /dev/null
+++ b/test/mem/memmove_backward.c
@@ -0,0 +1,10 @@
+#include <mem.h>
+
+static char buf[] = "hello world";
+
+int main(void) {
+ return calt_memcmp(calt_memmove(buf, buf + 6, 5), "world world",
+ sizeof buf - 1) == 0
+ ? 0
+ : 1;
+}
diff --git a/test/mem/memmove_null_backward.c b/test/mem/memmove_null_backward.c
new file mode 100644
index 0000000..5c8d477
--- /dev/null
+++ b/test/mem/memmove_null_backward.c
@@ -0,0 +1,10 @@
+#include <mem.h>
+
+static char buf[] = "hello world";
+
+int main(void) {
+ return calt_memcmp(calt_memmove(buf, buf + 6, 5), "world world",
+ sizeof buf - 1) == 0
+ ? 0
+ : 1;
+}
diff --git a/test/mem/memmove_null_overlap.c b/test/mem/memmove_null_overlap.c
new file mode 100644
index 0000000..6e786b5
--- /dev/null
+++ b/test/mem/memmove_null_overlap.c
@@ -0,0 +1,13 @@
+#include <mem.h>
+#include <stdio.h>
+#include <string.h>
+
+static char buf[] = "hello world";
+
+int main(void) {
+ calt_memmove(buf + 1, buf + 2, 5);
+ return calt_memcmp(buf, "hllo wworld",
+ sizeof buf - 1) == 0
+ ? 0
+ : 1;
+}
diff --git a/test/mem/memmove_null_prefix.c b/test/mem/memmove_null_prefix.c
new file mode 100644
index 0000000..87a505c
--- /dev/null
+++ b/test/mem/memmove_null_prefix.c
@@ -0,0 +1,11 @@
+#include <mem.h>
+
+static char const src[] = "hello";
+static char dest[sizeof(src)] = {0};
+
+int main(void) {
+ calt_memmove_null(dest, src, 3);
+ return calt_memcmp(src, dest, 3) == 0
+ ? calt_memcmp("\0\0\0", dest + 3, 3) == 0 ? 0 : 1
+ : 1;
+}
diff --git a/test/mem/memmove_null_same.c b/test/mem/memmove_null_same.c
new file mode 100644
index 0000000..95c75da
--- /dev/null
+++ b/test/mem/memmove_null_same.c
@@ -0,0 +1,9 @@
+#include <mem.h>
+
+static char const src[] = "hello";
+static char dest[sizeof(src)] = { 0 };
+
+int main(void) {
+ calt_memmove_null(dest, src, sizeof(src));
+ return calt_memcmp(src, dest, sizeof(src)) == 0 ? 0 : 1;
+}
diff --git a/test/mem/memmove_null_sing.c b/test/mem/memmove_null_sing.c
new file mode 100644
index 0000000..0ac6420
--- /dev/null
+++ b/test/mem/memmove_null_sing.c
@@ -0,0 +1,8 @@
+#include <mem.h>
+
+static char src[] = "hello";
+
+int main(void) {
+ calt_memmove(src, src, sizeof(src));
+ return calt_memcmp(src, "hello", sizeof(src)) == 0 ? 0 : 1;
+}
diff --git a/test/mem/memmove_nullnull.c b/test/mem/memmove_nullnull.c
new file mode 100644
index 0000000..325b859
--- /dev/null
+++ b/test/mem/memmove_nullnull.c
@@ -0,0 +1,8 @@
+#include <mem.h>
+#include <stddef.h>
+
+static char const src[] = "Hello World";
+
+int main(void){
+ return !calt_memmove_null(NULL, src, sizeof src) ? 0 : 1;
+}
diff --git a/test/mem/memmove_overlap.c b/test/mem/memmove_overlap.c
new file mode 100644
index 0000000..6e786b5
--- /dev/null
+++ b/test/mem/memmove_overlap.c
@@ -0,0 +1,13 @@
+#include <mem.h>
+#include <stdio.h>
+#include <string.h>
+
+static char buf[] = "hello world";
+
+int main(void) {
+ calt_memmove(buf + 1, buf + 2, 5);
+ return calt_memcmp(buf, "hllo wworld",
+ sizeof buf - 1) == 0
+ ? 0
+ : 1;
+}
diff --git a/test/mem/memmove_prefix.c b/test/mem/memmove_prefix.c
new file mode 100644
index 0000000..a6715c7
--- /dev/null
+++ b/test/mem/memmove_prefix.c
@@ -0,0 +1,11 @@
+#include <mem.h>
+
+static char const src[] = "hello";
+static char dest[sizeof(src)] = {0};
+
+int main(void) {
+ calt_memmove(dest, src, 3);
+ return calt_memcmp(src, dest, 3) == 0
+ ? calt_memcmp("\0\0\0", dest + 3, 3) == 0 ? 0 : 1
+ : 1;
+}
diff --git a/test/mem/memmove_same.c b/test/mem/memmove_same.c
new file mode 100644
index 0000000..0e032de
--- /dev/null
+++ b/test/mem/memmove_same.c
@@ -0,0 +1,9 @@
+#include <mem.h>
+
+static char const src[] = "hello";
+static char dest[sizeof(src)] = { 0 };
+
+int main(void) {
+ calt_memmove(dest, src, sizeof(src));
+ return calt_memcmp(src, dest, sizeof(src)) == 0 ? 0 : 1;
+}
diff --git a/test/mem/memmove_sing.c b/test/mem/memmove_sing.c
new file mode 100644
index 0000000..3845f35
--- /dev/null
+++ b/test/mem/memmove_sing.c
@@ -0,0 +1,8 @@
+#include <mem.h>
+
+static char src[] = "hello";
+
+int main(void) {
+ calt_memmove(src, src, sizeof(src));
+ return calt_memcmp(src, "hello", sizeof(src)) == 0 ? 0 : 1;
+}
diff --git a/test/mem/memrchr.c b/test/mem/memrchr.c
new file mode 100644
index 0000000..3ade333
--- /dev/null
+++ b/test/mem/memrchr.c
@@ -0,0 +1,5 @@
+#include <mem.h>
+
+static char const buf[] = "test";
+
+int main(void) { return calt_memrchr(buf, 't', sizeof buf) == &buf[3] ? 0 : 1; }
diff --git a/test/mem/memrchr_notfound.c b/test/mem/memrchr_notfound.c
new file mode 100644
index 0000000..bc9ddec
--- /dev/null
+++ b/test/mem/memrchr_notfound.c
@@ -0,0 +1,5 @@
+#include <mem.h>
+
+static char const buf[] = "test";
+
+int main(void) { return calt_memrchr(buf, 'u', sizeof buf) == NULL ? 0 : 1; }
diff --git a/test/mem/memrev.c b/test/mem/memrev.c
new file mode 100644
index 0000000..b10c7c1
--- /dev/null
+++ b/test/mem/memrev.c
@@ -0,0 +1,7 @@
+#include <mem.h>
+
+static char src[] = "abc";
+
+int main(void) {
+ return calt_memcmp(calt_memrev(src, 3), "cba", 3) == 0 ? 0 : 1;
+}
diff --git a/test/mem/memset_null.c b/test/mem/memset_null.c
new file mode 100644
index 0000000..bcf4339
--- /dev/null
+++ b/test/mem/memset_null.c
@@ -0,0 +1,14 @@
+#include <mem.h>
+#include <stddef.h>
+
+static char buf[100];
+
+int main(void){
+ calt_memset_null(buf, 'A', sizeof buf);
+ for(size_t i = 0; i < sizeof buf; i++){
+ if('A' != buf[i]){
+ return 1;
+ }
+ }
+ return 0;
+}
diff --git a/test/mem/memset_nullnull.c b/test/mem/memset_nullnull.c
new file mode 100644
index 0000000..a74e180
--- /dev/null
+++ b/test/mem/memset_nullnull.c
@@ -0,0 +1,6 @@
+#include <mem.h>
+#include <stddef.h>
+
+int main(void){
+ return !calt_memset_null(NULL, 'A', 10) ? 0 : 1;
+}
diff --git a/test/mem/memswap.c b/test/mem/memswap.c
new file mode 100644
index 0000000..a5be39f
--- /dev/null
+++ b/test/mem/memswap.c
@@ -0,0 +1,11 @@
+#include <mem.h>
+
+static int const a = 1;
+static int const b = 2;
+
+int main(void){
+ int x = a;
+ int y = b;
+ calt_memswap(&x, &y, sizeof x);
+ return x == b && y == a ? 0 : 1;
+}
diff --git a/test/mem/memswap_null.c b/test/mem/memswap_null.c
new file mode 100644
index 0000000..015f3f3
--- /dev/null
+++ b/test/mem/memswap_null.c
@@ -0,0 +1,6 @@
+#include <mem.h>
+
+int main(void){
+ calt_memswap(NULL, NULL, 1);
+ return 0;
+}
diff --git a/test/mem/memswap_same.c b/test/mem/memswap_same.c
new file mode 100644
index 0000000..532f8c9
--- /dev/null
+++ b/test/mem/memswap_same.c
@@ -0,0 +1,9 @@
+#include <mem.h>
+
+static int const a = 1;
+
+int main(void){
+ int x = a;
+ calt_memswap(&x, &x, sizeof x);
+ return x == a ? 0 : 1;
+}
diff --git a/test/mem/memzero_null.c b/test/mem/memzero_null.c
new file mode 100644
index 0000000..ef817a1
--- /dev/null
+++ b/test/mem/memzero_null.c
@@ -0,0 +1,14 @@
+#include <mem.h>
+#include <stddef.h>
+
+static char buf[100];
+
+int main(void){
+ calt_memzero_null(buf, sizeof buf);
+ for(size_t i = 0; i < sizeof buf; i++){
+ if('\0' != buf[i]){
+ return 1;
+ }
+ }
+ return 0;
+}
diff --git a/test/mem/memzero_nullnull.c b/test/mem/memzero_nullnull.c
new file mode 100644
index 0000000..c916818
--- /dev/null
+++ b/test/mem/memzero_nullnull.c
@@ -0,0 +1,6 @@
+#include <mem.h>
+#include <stddef.h>
+
+int main(void){
+ return !calt_memzero_null(NULL, 10) ? 0 : 1;
+}
diff --git a/test/mem/meson.build b/test/mem/meson.build
index 8cc5fc9..d4d75ae 100644
--- a/test/mem/meson.build
+++ b/test/mem/meson.build
@@ -1,9 +1,152 @@
-memset = executable('memset', 'memset.c',
+test('memset', executable('memset', 'memset.c',
dependencies : calt
-)
-test('memset', memset)
+))
-memzero = executable('memzero', 'memzero.c',
+test('memset_null Non Null Pointer', executable('memset_null', 'memset_null.c',
dependencies : calt
-)
-test('memzero', memzero)
+))
+
+test('memset_null Null Pointer', executable('memset_nullnull', 'memset_nullnull.c',
+ dependencies : calt
+))
+
+test('memzero', executable('memzero', 'memzero.c',
+ dependencies : calt
+))
+
+test('memzero_null Non Null Pointer', executable('memzero_null', 'memzero_null.c',
+ dependencies : calt
+))
+
+test('memzero_null Null Pointer', executable('memzero_nullnull', 'memzero_nullnull.c',
+ dependencies : calt
+))
+
+test('memcmp Same', executable('memcmp_same', 'memcmp_same.c',
+ dependencies : calt
+))
+
+test('memcmp Different',executable('memcmp_diff', 'memcmp_diff.c',
+ dependencies : calt
+))
+
+test('memcmp Prefix', executable('memcmp_prefix', 'memcmp_prefix.c',
+ dependencies : calt
+))
+
+test('memcmp Same Non-Null', executable('memcmp_sing', 'memcmp_sing.c',
+ dependencies : calt
+))
+
+test('memcmp Same Null', executable('memcmp_samenull', 'memcmp_samenull.c',
+ dependencies : calt
+))
+
+test('memcpy Same', executable('memcpy_same', 'memcpy_same.c',
+ dependencies : calt
+))
+
+test('memcpy Prefix', executable('memcpy_prefix', 'memcpy_prefix.c',
+ dependencies : calt
+))
+
+test('memcpy_null Same', executable('memcpy_null_same', 'memcpy_null_same.c',
+ dependencies : calt
+))
+
+test('memcpy_null Prefix', executable('memcpy_null_prefix', 'memcpy_null_prefix.c',
+ dependencies : calt
+))
+
+test('memcpy_null Null Pointer', executable('memcpy_nullnull', 'memcpy_nullnull.c',
+ dependencies : calt
+))
+
+test('memmove Same', executable('memmove_same', 'memmove_same.c',
+ dependencies : calt
+))
+
+test('memmove Same Pointer', executable('memmove_sing', 'memmove_null_sing.c',
+ dependencies : calt
+))
+
+test('memmove Prefix', executable('memmove_prefix', 'memmove_prefix.c',
+ dependencies : calt
+))
+
+test('memmove Overlap', executable('memmove_overlap', 'memmove_overlap.c',
+ dependencies : calt
+))
+
+test('memmove Backward', executable('memmove_backward', 'memmove_backward.c',
+ dependencies : calt
+))
+
+test('memmove_null Same', executable('memmove_null_same', 'memmove_null_same.c',
+ dependencies : calt
+))
+
+test('memmove_null Same Pointer', executable('memmove_null_sing', 'memmove_null_sing.c',
+ dependencies : calt
+))
+
+test('memmove_null Prefix', executable('memmove_null_prefix', 'memmove_null_prefix.c',
+ dependencies : calt
+))
+
+test('memmove_null Overlap', executable('memmove_null_overlap', 'memmove_null_overlap.c',
+ dependencies : calt
+))
+
+test('memmove_null Backward', executable('memmove_null_backward', 'memmove_null_backward.c',
+ dependencies : calt
+))
+
+test('memmove_null Null Pointer', executable('memmove_nullnull', 'memmove_nullnull.c',
+ dependencies : calt
+))
+
+test('memccpy_null Null Pointer', executable('memccpy_nullnull', 'memccpy_nullnull.c',
+ dependencies : calt
+))
+
+test('memrev', executable('memrev', 'memrev.c',
+ dependencies : calt
+))
+
+test('memswap', executable('memswap', 'memswap.c',
+ dependencies : calt
+))
+
+test('memswap Same', executable('memswap_same', 'memswap_same.c',
+ dependencies : calt
+))
+
+test('memswap Null', executable('memswap_null', 'memswap_null.c',
+ dependencies : calt
+))
+
+test('memlen', executable('memlen', 'memlen.c',
+ dependencies : calt
+))
+
+test('memlen Overflow', executable('memlen_overflow', 'memlen_overflow.c',
+ dependencies : calt
+))
+
+test('memchr Found', executable('memchr', 'memchr.c',
+ dependencies : calt
+))
+
+test('memchr Not Found', executable('memchr_notfound', 'memchr_notfound.c',
+ dependencies : calt
+))
+
+test('memrchr Found', executable('memrchr', 'memrchr.c',
+ dependencies : calt
+))
+
+test('memrchr Not Found', executable('memrchr_notfound', 'memrchr_notfound.c',
+ dependencies : calt
+))
+
diff --git a/test/meson.build b/test/meson.build
index 5e7b530..65c5ed3 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -1,6 +1,6 @@
dirs = [
- 'alloc',
'mem',
+ 'alloc',
]
foreach dir: dirs