Navigation Menu

Skip to content

Commit

Permalink
Resurrect tests using the include-only version of Boost.Test
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Matthew Mott committed Feb 19, 2019
1 parent 1558f10 commit 6caff69
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
12 changes: 5 additions & 7 deletions radiant/Makefile.am
Expand Up @@ -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

3 changes: 1 addition & 2 deletions radiant/test/facePlaneTest.cpp
@@ -1,6 +1,5 @@
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE facePlaneTest
#include <boost/test/unit_test.hpp>
#include <boost/test/included/unit_test.hpp>

#include "radiant/brush/FacePlane.h"
#include "math/Matrix4.h"
Expand Down

0 comments on commit 6caff69

Please sign in to comment.