From: Erwin Janssen Date: Mon, 8 Aug 2016 09:59:34 +0000 (+0200) Subject: Simple unit test added. X-Git-Tag: untagged-27ff95768eb6958bcef7^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ed1b4f0722f36bb2a71267133399a69ab5cba4df;p=graphviz Simple unit test added. This unit test serves to validate the configuration and installation of the Criterion unit testing framework. This test will only be compiled and run if Criterion is installed. --- diff --git a/.gitignore b/.gitignore index 390b2c149..6e55de978 100644 --- a/.gitignore +++ b/.gitignore @@ -199,6 +199,11 @@ contrib/prune/prune # Files generated during make check rtest/ndata rtest/nhtml +tests/**/*.log +tests/**/*.trs + +## Binaries +tests/lib/common/command_line # Folders generated by Visual Studio builds **/Debug/** diff --git a/Makefile.am b/Makefile.am index 46ac9a315..442b6d128 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,7 @@ pkginclude_HEADERS = $(top_builddir)/graphviz_version.h man_MANS = graphviz.7 # $(subdirs) contains the list from: AC_CONFIG_SUBDIRS -SUBDIRS = $(subdirs) lib plugin cmd tclpkg doc contrib share graphs rtest +SUBDIRS = $(subdirs) lib plugin cmd tclpkg doc contrib share graphs rtest tests .PHONY: doxygen doxygen: diff --git a/configure.ac b/configure.ac index 33f418dbb..48bc28e20 100644 --- a/configure.ac +++ b/configure.ac @@ -3287,6 +3287,9 @@ AC_CONFIG_FILES(Makefile tclpkg/gv/demo/Makefile tclpkg/gv/META.gv rtest/Makefile + tests/Makefile + tests/lib/Makefile + tests/lib/common/Makefile share/Makefile share/examples/Makefile share/gui/Makefile diff --git a/tests/Makefile.am b/tests/Makefile.am new file mode 100644 index 000000000..92600a707 --- /dev/null +++ b/tests/Makefile.am @@ -0,0 +1,4 @@ +# $Id$ $Revision$ +## Process this file with automake to produce Makefile.in + +SUBDIRS = lib diff --git a/tests/lib/Makefile.am b/tests/lib/Makefile.am new file mode 100644 index 000000000..952894916 --- /dev/null +++ b/tests/lib/Makefile.am @@ -0,0 +1,4 @@ +# $Id$ $Revision$ +## Process this file with automake to produce Makefile.in + +SUBDIRS = common diff --git a/tests/lib/common/Makefile.am b/tests/lib/common/Makefile.am new file mode 100644 index 000000000..c745d8e76 --- /dev/null +++ b/tests/lib/common/Makefile.am @@ -0,0 +1,15 @@ +# $Id$ $Revision$ +## Process this file with automake to produce Makefile.in + +if HAVE_CRITERION + +AM_LDFLAGS = \ + -lcriterion + +TESTS = command_line + +bin_PROGRAMS = $(TESTS) + +command_line_SOURCES = command_line.c + +endif diff --git a/tests/lib/common/command_line.c b/tests/lib/common/command_line.c new file mode 100644 index 000000000..80d51977b --- /dev/null +++ b/tests/lib/common/command_line.c @@ -0,0 +1,8 @@ +#include + +#include + +Test(test, success) +{ + cr_assert(true); +}