AM_LIBTOOLFLAGS = --silent
GNUMAKEFLAGS = --no-print-directory
-AM_CPPFLAGS = -Iinclude -I$(srcdir)/include -I$(srcdir)/src -I.
+AM_CPPFLAGS = -Iinclude -I$(srcdir)/include -I$(srcdir)/src -I$(srcdir)/tests -I.
AM_CXXFLAGS = $(SRF_WXXFLAGS) $(LIBSIGROKFLOW_CFLAGS)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libsigrokflow.pc
+TESTS = tests/main
+check_PROGRAMS = tests/main
+
+tests_main_SOURCES = \
+ include/libsigrokflow/libsigrokflow.hpp \
+ tests/main.cpp
+
+tests_main_LDADD = libsigrokflow.la $(LIBSIGROKFLOW_LIBS)
+
.PHONY: dist-changelog
dist-hook: dist-changelog
--- /dev/null
+/*
+ * This file is part of the libsigrokflow project.
+ *
+ * Copyright (C) 2018 Uwe Hermann <uwe@hermann-uwe.de>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define CATCH_CONFIG_MAIN
+#include <catch2/catch.hpp>
+#include <libsigrokflow/libsigrokflow.hpp>
+
+/* This is only the main Catch2 executable, actual tests are in other files. */