From 2f96859234ee8971555f471a798c8cdbf00bf251 Mon Sep 17 00:00:00 2001 From: Dmitry Simonenko Date: Thu, 24 Nov 2016 16:13:49 +0300 Subject: [PATCH] flint: add tests directory --- tests/env.c | 16 ++++++++++++++++ tests/makefile | 19 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 tests/env.c create mode 100644 tests/makefile diff --git a/tests/env.c b/tests/env.c new file mode 100644 index 00000000..925f6a44 --- /dev/null +++ b/tests/env.c @@ -0,0 +1,16 @@ + +/* + * machinarium. + * + * Cooperative multitasking engine. +*/ + +#include + +int +main(int argc, char *argv[]) +{ + mm_t env = mm_new(); + mm_free(env); + return 0; +} diff --git a/tests/makefile b/tests/makefile new file mode 100644 index 00000000..444a4c74 --- /dev/null +++ b/tests/makefile @@ -0,0 +1,19 @@ +CC = gcc +RM = rm +CFLAGS = -I. -Wall -g -O0 -I../machinarium +LFLAGS_LIB = ../machinarium/libmachinarium.a +LFLAGS = $(LFLAGS_LIB) -luv +all: validate clean env +env: + $(CC) $(CFLAGS) env.c $(LFLAGS) -o env +validate: + @if [ ! -f $(LFLAGS_LIB) ]; then \ + echo ""; \ + echo "Please build the library first."; \ + echo ""; \ + exit 1; \ + fi +.c.o: + $(CC) $(CFLAGS) -c $< +clean: + $(RM) -f env