Commit dceb293f authored by Mike Fleetwood's avatar Mike Fleetwood Committed by Curtis Gedak

Add unit test suites with initial successful dummy test (#781978)

Now 'make check' will additionally build and run the test suites in the
./tests directory.  Add initial always successful dummy test suite.
This is done using Automake support for testing.

    Automake Manual, 15 Support for test suites
    https://www.gnu.org/software/automake/manual/automake.html#Tests

./tests/Makefile.am takes some influence from the same file in the
minimal-gtest-autotools template project.
    https://github.com/octol/minimal-gtest-autotools/blob/654848ec0164a80f851fa80b8355099f35c025a2/tests/Makefile.am

Bug 781978 - Add Google Test C++ test framework
parent 81b10492
......@@ -43,5 +43,10 @@ missing
mkinstalldirs
omf.make
stamp-*
test-driver
testbuild.log
tests/*.log
tests/*.trs
tests/test-suite.log
tests/test_dummy
xmldocs.make
SUBDIRS = compose data doc include lib po src
SUBDIRS = compose data doc include lib po src tests
# Only build GParted help documentation when enabled. (Can be disabled
# with './configure --disable-doc').
if BUILD_HELP_DOC
......
......@@ -383,6 +383,7 @@ lib/Makefile
lib/gtest/Makefile
src/Makefile
po/Makefile.in
tests/Makefile
])
AC_OUTPUT
......
AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/lib/gtest/include \
$(GTEST_CPPFLAGS)
AM_CXXFLAGS = -Wall $(GTEST_CXXFLAGS)
AM_LDFLAGS = $(GTEST_LDFLAGS)
LDADD = \
$(GTEST_LIBS) \
$(top_srcdir)/lib/gtest/lib/libgtest_main.la \
$(top_srcdir)/lib/gtest/lib/libgtest.la
# Programs to be built by "make check"
check_PROGRAMS = \
test_dummy
# Test cases to be run by "make check"
TESTS = $(check_PROGRAMS)
test_dummy_SOURCES = test_dummy.cc
/* Copyright (C) 2017 Mike Fleetwood
*
* Copying and distribution of this file, with or without modification,
* are permitted in any medium without royalty provided the copyright
* notice and this notice are preserved. This file is offered as-is,
* without any warranty.
*/
#include "gtest/gtest.h"
TEST( DummyTest, Success )
{
EXPECT_TRUE( true );
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment