aboutsummaryrefslogtreecommitdiffstats
path: root/rawmemchr.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--rawmemchr.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/rawmemchr.c b/rawmemchr.c
index 6dd8496..57f584d 100644
--- a/rawmemchr.c
+++ b/rawmemchr.c
@@ -9,3 +9,17 @@ libsimple_rawmemchr(const void *s_, int c)
while ((int)*s++ != c);
return &s[-1];
}
+
+
+#ifdef TEST
+#include <assert.h>
+
+int
+main(void)
+{
+ assert(!strcmp(libsimple_rawmemchr("1234512345", '3'), "34512345"));
+ assert(!strcmp(libsimple_rawmemchr("1234512345", '1'), "1234512345"));
+ return 0;
+}
+
+#endif