From 3e746c51b3adcf97e4d11be30bfd91c8aaf2c2ba Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 18 Aug 2018 23:40:11 +0200 Subject: Fix and run tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- memstarts.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'memstarts.c') diff --git a/memstarts.c b/memstarts.c index 05c8b39..ace2b70 100644 --- a/memstarts.c +++ b/memstarts.c @@ -1,5 +1,6 @@ /* See LICENSE file for copyright and license details. */ #include "libsimple.h" +#ifndef TEST int @@ -14,8 +15,8 @@ libsimple_memstarts(const void *s_, size_t n, const void *t_, size_t m) } -#ifdef TEST -#include +#else +#include "test.h" int main(void) @@ -32,7 +33,7 @@ main(void) assert(libsimple_memstarts("test", 4, "x", 1) == 0); assert(libsimple_memstarts("test", 4, "xx", 2) == 0); - assert(libsimple_memstarts("TEST", 4, "", 0) == 1; + assert(libsimple_memstarts("TEST", 4, "", 0) == 1); assert(libsimple_memstarts("TEST", 4, "test", 4) == 0); assert(libsimple_memstarts("TEST", 4, "test", 5) == 0); assert(libsimple_memstarts("TEST", 4, "testx", 5) == 0); -- cgit v1.2.3-70-g09d2