From 06ec4982b1d3be9582d1be8cc93f7285ca948a05 Mon Sep 17 00:00:00 2001 From: maddaat Date: Fri, 10 Apr 2026 18:20:08 +0400 Subject: Initial commit --- tests/.gitignore | 1 + tests/Makefile.am | 8 ++++++++ tests/test_foobar.c | 15 +++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 tests/.gitignore create mode 100644 tests/Makefile.am create mode 100644 tests/test_foobar.c (limited to 'tests') 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 + +#include "../src/common.h" + +int main(void) +{ + assert(foobar_internal(2, 3) == 5); + return 0; +} -- cgit v1.2.3