From 6caff69856481136cc7fb6826d5b794ac360935c Mon Sep 17 00:00:00 2001 From: Matthew Mott Date: Tue, 19 Feb 2019 20:27:14 +0000 Subject: [PATCH] Resurrect tests using the include-only version of Boost.Test Tests were previously disabled to avoid linking with the Boost.Test dynamic library. This can be avoided by using the header-only version, which imposes the limitation that each test module can only contain a single translation unit. Currently the only test module is the facePlaneTest. --- radiant/Makefile.am | 12 +++++------- radiant/test/facePlaneTest.cpp | 3 +-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/radiant/Makefile.am b/radiant/Makefile.am index 69e17ed24b..a5228b0671 100644 --- a/radiant/Makefile.am +++ b/radiant/Makefile.am @@ -443,12 +443,10 @@ darkradiant_SOURCES = main.cpp \ model/ScaledModelExporter.cpp \ model/NullModelNode.cpp -# greebo: Disabled the tests for the moment being to not depend on boost just for this -#TESTS = facePlaneTest -#check_PROGRAMS = facePlaneTest +TESTS = facePlaneTest +check_PROGRAMS = facePlaneTest -#facePlaneTest_SOURCES = test/facePlaneTest.cpp \ -# brush/FacePlane.cpp -#facePlaneTest_LDADD = $(BOOST_UNIT_TEST_FRAMEWORK_LIBS) \ -# $(top_builddir)/libs/math/libmath.la +facePlaneTest_SOURCES = test/facePlaneTest.cpp \ + brush/FacePlane.cpp +facePlaneTest_LDADD = $(top_builddir)/libs/math/libmath.la diff --git a/radiant/test/facePlaneTest.cpp b/radiant/test/facePlaneTest.cpp index f90f07fce0..3675f71463 100644 --- a/radiant/test/facePlaneTest.cpp +++ b/radiant/test/facePlaneTest.cpp @@ -1,6 +1,5 @@ -#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE facePlaneTest -#include +#include #include "radiant/brush/FacePlane.h" #include "math/Matrix4.h"