summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/.gitignore1
-rw-r--r--tests/Makefile.am8
-rw-r--r--tests/test_foobar.c15
3 files changed, 24 insertions, 0 deletions
diff --git a/tests/.gitignore b/tests/.gitignore
new file mode 100644
index 0000000..8430234
--- /dev/null
+++ b/tests/.gitignore
@@ -0,0 +1 @@
+/test_foobar
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..227a1a2
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,8 @@
+include $(top_srcdir)/make/shared.am
+
+TESTS =
+noinst_PROGRAMS = $(TESTS)
+
+TESTS += test_foobar
+test_foobar_LDADD = $(top_builddir)/libfoobar.a
+test_foobar_SOURCES = test_foobar.c
diff --git a/tests/test_foobar.c b/tests/test_foobar.c
new file mode 100644
index 0000000..bcde749
--- /dev/null
+++ b/tests/test_foobar.c
@@ -0,0 +1,15 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#undef NDEBUG
+
+#include <assert.h>
+
+#include "../src/common.h"
+
+int main(void)
+{
+ assert(foobar_internal(2, 3) == 5);
+ return 0;
+}