diff options
author | Daniel Burrows <dburrows@debian.org> | 2009-07-26 14:57:54 -0700 |
---|---|---|
committer | Daniel Burrows <dburrows@debian.org> | 2009-07-26 14:57:54 -0700 |
commit | 5c2699c36e87ba6506450f18aec268af74cb2ab3 (patch) | |
tree | 5277b193189435babc8af304459812be825ef24a /tests | |
parent | 56c8d42baa532c348d0ed076bcdf4d47eb63ff85 (diff) | |
download | aptitude-5c2699c36e87ba6506450f18aec268af74cb2ab3.tar.gz |
Add a skeletal unit tester using the Boost framework.
The Boost framework is a lot nicer to work with than cppunit. Rather
than migrate over all at once, I'm going to start writing new tests with
Boost, migrating old ones as I have time.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 14 | ||||
-rw-r--r-- | tests/boost_test_main.cc | 9 | ||||
-rw-r--r-- | tests/cppunit_test_main.cc (renamed from tests/main.cc) | 0 |
3 files changed, 18 insertions, 5 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 2186772b..c85f3a5b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,18 +1,19 @@ MAINTAINERCLEANFILES = Makefile.in INCLUDES = -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/src -I$(srcdir) +CPPFLAGS += -DBOOST_TEST_DYN_LINK LDADD = $(top_builddir)/src/loggers.o \ $(top_builddir)/src/generic/apt/matching/libgeneric-matching.a \ $(top_builddir)/src/generic/apt/libgeneric-apt.a \ $(top_builddir)/src/generic/apt/matching/libgeneric-matching.a \ $(top_builddir)/src/generic/problemresolver/libgeneric-problemresolver.a \ -$(top_builddir)/src/generic/util/libgeneric-util.a -lcppunit +$(top_builddir)/src/generic/util/libgeneric-util.a -lcppunit -lboost_unit_test_framework-mt -check_PROGRAMS = test +check_PROGRAMS = cppunit_test boost_test noinst_PROGRAMS = interactive_set_test -TESTS = test +TESTS = cppunit_test boost_test EXTRADIST = resolver_inputs @@ -24,8 +25,8 @@ test_promotion_set.o test_resolver_hints.o: $(top_srcdir)/src/generic/problemres # Note: test_apt_universe is not built by default because it takes way # too long. Of course, ideally this would be done in a less ad-hoc # way... -test_SOURCES = \ - main.cc \ +cppunit_test_SOURCES = \ + cppunit_test_main.cc \ test_choice.cc \ test_choice_set.cc \ test_config_pusher.cc \ @@ -39,3 +40,6 @@ test_SOURCES = \ test_tags.cc \ test_temp.cc \ test_wtree.cc + +boost_test_SOURCES = \ + boost_test_main.cc diff --git a/tests/boost_test_main.cc b/tests/boost_test_main.cc new file mode 100644 index 00000000..046a1cc9 --- /dev/null +++ b/tests/boost_test_main.cc @@ -0,0 +1,9 @@ +#define BOOST_TEST_MAIN + +#include <boost/test/unit_test.hpp> + +// One dummy test so that this can be dropped in before the actual +// test suite is written. +BOOST_AUTO_TEST_CASE(dummy) +{ +} diff --git a/tests/main.cc b/tests/cppunit_test_main.cc index 6d959b1b..6d959b1b 100644 --- a/tests/main.cc +++ b/tests/cppunit_test_main.cc |