aboutsummaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
authoraxtloss <axtlos@getcryst.al>2024-06-24 21:50:48 +0200
committeraxtloss <axtlos@getcryst.al>2024-06-24 21:50:48 +0200
commita084dfa02d28a9372a7e406c9b101a43308a4937 (patch)
tree620d7fe5f55fa76572f5666465997f397b8bbd2a /test.c
parent1d4b6499993050876a453a3f96e2428fdfd42610 (diff)
downloadextlib-a084dfa02d28a9372a7e406c9b101a43308a4937.tar.gz
extlib-a084dfa02d28a9372a7e406c9b101a43308a4937.tar.bz2
Add new function memvcmp and unit tests
Diffstat (limited to '')
-rw-r--r--test.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/test.c b/test.c
deleted file mode 100644
index 807b417..0000000
--- a/test.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <extlib.h>
-#include <assert.h>
-
-void print_hex(const char *s)
-{
- while(*s)
- printf("%02x", (unsigned int) *s++);
- printf("\n");
-}
-
-int
-main(void) {
- char *test = malloc_secure (9);
- sprintf (test, "meowmeow");
- assert (strcmp (test, "meowmeow") == 0);
- puts ("Test 1 passed");
- char *upper = strupr (test);
- assert (strcmp (upper, "MEOWMEOW") == 0);
- puts ("Test 2 passed");
- char *lower = strlwr (test);
- assert (strcmp (lower, "meowmeow") == 0);
- puts ("Test 3 passed");
- free_secure (lower, strlen (lower));
-}