Skip to content

Commit

Permalink
[unittest] Change the way boost test framework is included to avoid c…
Browse files Browse the repository at this point in the history
…orruption in tests
  • Loading branch information
servantftechnicolor authored and fabiencastan committed Apr 26, 2020
1 parent ce27c4a commit fc1b0ab
Show file tree
Hide file tree
Showing 72 changed files with 144 additions and 72 deletions.
3 changes: 2 additions & 1 deletion src/aliceVision/camera/pinholeBrown_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#include <aliceVision/camera/camera.hpp>

#define BOOST_TEST_MODULE pinholeBrown
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <aliceVision/unitTest.hpp>

Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/camera/pinholeFisheye1_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
#include <aliceVision/camera/camera.hpp>

#define BOOST_TEST_MODULE pinholeFisheye1
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <aliceVision/unitTest.hpp>

Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/camera/pinholeFisheye_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#include <aliceVision/camera/camera.hpp>

#define BOOST_TEST_MODULE pinholeFisheye
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <aliceVision/unitTest.hpp>

Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/camera/pinholeRadial_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#include <aliceVision/camera/camera.hpp>

#define BOOST_TEST_MODULE pinholeRadial
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <aliceVision/unitTest.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
#include "dependencies/htmlDoc/htmlDoc.hpp"

#define BOOST_TEST_MODULE GainOffsetConstraintBuilder
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace aliceVision;
Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/feature/features_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
#include <vector>

#define BOOST_TEST_MODULE Feature
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace std;
Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/geometry/frustumIntersection_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
#include <iostream>

#define BOOST_TEST_MODULE frustumIntersection
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace aliceVision;
Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/geometry/halfSpaceIntersection_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
#include <iostream>

#define BOOST_TEST_MODULE halfSpaceIntersection
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace aliceVision;
Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/geometry/rigidTransformation3D_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
#include <iostream>

#define BOOST_TEST_MODULE rigidTransformation3D
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace aliceVision;
Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/graph/connectedComponent_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
#include <vector>

#define BOOST_TEST_MODULE connectedComponent
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace lemon;
Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/graph/triplet_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
#include <vector>

#define BOOST_TEST_MODULE tripletFinder
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace aliceVision::graph;
Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/image/drawing_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#include "aliceVision/image/all.hpp"

#define BOOST_TEST_MODULE ImageDrawing
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace aliceVision;
Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/image/filtering_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
#include <iostream>

#define BOOST_TEST_MODULE ImageFiltering
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace aliceVision;
Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/image/image_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
#include <iostream>

#define BOOST_TEST_MODULE Image
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace std;
Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/image/io_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
#include "aliceVision/image/all.hpp"

#define BOOST_TEST_MODULE imageIO
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

#include <cstdio>
Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/image/resampling_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
#include <sstream>

#define BOOST_TEST_MODULE ImageRessampling
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace aliceVision;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
#include <iostream>

#define BOOST_TEST_MODULE LIGHTING_ESTIMATION
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

#include <aliceVision/unitTest.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
#include "aliceVision/multiview/translationAveraging/translationAveragingTest.hpp"

#define BOOST_TEST_MODULE translation_averaging_globalTi_from_tijs
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <aliceVision/unitTest.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
#include "aliceVision/multiview/translationAveraging/translationAveragingTest.hpp"

#define BOOST_TEST_MODULE globalTi_from_tijs_Triplets
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <aliceVision/unitTest.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
#include <vector>

#define BOOST_TEST_MODULE ResectionLInfinityRobust
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace aliceVision;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@


#define BOOST_TEST_MODULE ResectionLInfinity
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <aliceVision/unitTest.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
#include <vector>

#define BOOST_TEST_MODULE TranslationStructureLInfinityNoisy
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace aliceVision;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
#include <vector>

#define BOOST_TEST_MODULE TranslationStructureLInfinity
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace aliceVision;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
#include "aliceVision/linearProgramming/lInfinityCV/triangulation.hpp"

#define BOOST_TEST_MODULE lInfinityCVTriangulation
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace aliceVision;
Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/linearProgramming/linearProgramming_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
#include "aliceVision/linearProgramming/OSIXSolver.hpp"

#define BOOST_TEST_MODULE linearProgramming
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace aliceVision;
Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/localization/LocalizationResult_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
#include <random>

#define BOOST_TEST_MODULE LocalizationResult
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <aliceVision/unitTest.hpp>

Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/localization/rigResection_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
#include <random>

#define BOOST_TEST_MODULE rigResection
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace aliceVision;
Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/matching/filters_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#include "aliceVision/matching/filters.hpp"

#define BOOST_TEST_MODULE matchingFilters
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>

using namespace aliceVision;
using namespace aliceVision::matching;
Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/matching/indMatch_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
#include <boost/filesystem/operations.hpp>

#define BOOST_TEST_MODULE IndMatch
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/filesystem.hpp>

Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/matching/matching_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
#include <iostream>

#define BOOST_TEST_MODULE matching
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace std;
Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/matching/metric_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
#include <string>

#define BOOST_TEST_MODULE matchingMetric
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace std;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
#include <aliceVision/matchingImageCollection/geometricFilterUtils.hpp>

#define BOOST_TEST_MODULE matchingImageCollectionPairBuilder
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace std;
Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/matchingImageCollection/pairBuilder_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
#include <memory>

#define BOOST_TEST_MODULE matchingImageCollectionPairBuilder
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace std;
Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/multiview/affineSolver_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
#include <aliceVision/multiview/affineSolver.hpp>

#define BOOST_TEST_MODULE multiviewAffineSolver
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <aliceVision/unitTest.hpp>

Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/multiview/essentialFivePointSolver_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
#include "aliceVision/multiview/NViewDataSet.hpp"

#define BOOST_TEST_MODULE essentialFivePointSolver
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <aliceVision/unitTest.hpp>

Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/multiview/essentialKernelSolver_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
#include "aliceVision/multiview/NViewDataSet.hpp"

#define BOOST_TEST_MODULE essentialKernelSolver
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <aliceVision/unitTest.hpp>

Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/multiview/fundamentalKernelSolver_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
#include "aliceVision/multiview/projection.hpp"

#define BOOST_TEST_MODULE fundamentalKernelSolver
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

using namespace aliceVision;
Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/multiview/homographyKernelSolver_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
#include "aliceVision/multiview/homographyKernelSolver.hpp"

#define BOOST_TEST_MODULE homographyKernelSolver
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <aliceVision/unitTest.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
#include <vector>

#define BOOST_TEST_MODULE knownRotationTranslationKernel
#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <aliceVision/unitTest.hpp>

Expand Down
3 changes: 2 additions & 1 deletion src/aliceVision/multiview/resection/p4pfSolver_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
#include <aliceVision/multiview/resection/P4PfSolver.hpp>
#include <aliceVision/multiview/NViewDataSet.hpp>

#include <boost/test/included/unit_test.hpp>

#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>

#include <vector>
Expand Down
Loading

0 comments on commit fc1b0ab

Please sign in to comment.