From: Uwe Hermann Date: Tue, 8 Jan 2019 22:08:25 +0000 (+0100) Subject: Add initial tests/main.cpp (main Catch2 file). X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=7c9a90f02115d42a980606131c109f46803c6ecb;p=libsigrokflow.git Add initial tests/main.cpp (main Catch2 file). No unit tests have been added so far. --- diff --git a/Makefile.am b/Makefile.am index 1dd7f30..5370af1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,7 +21,7 @@ ACLOCAL_AMFLAGS = -I m4 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) @@ -40,6 +40,15 @@ library_include_HEADERS = \ 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 diff --git a/tests/main.cpp b/tests/main.cpp new file mode 100644 index 0000000..841c453 --- /dev/null +++ b/tests/main.cpp @@ -0,0 +1,24 @@ +/* + * This file is part of the libsigrokflow project. + * + * Copyright (C) 2018 Uwe Hermann + * + * 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 . + */ + +#define CATCH_CONFIG_MAIN +#include +#include + +/* This is only the main Catch2 executable, actual tests are in other files. */