From cdeb18c8a998a1c31b8e47e7ec9a1fe7fa6263e6 Mon Sep 17 00:00:00 2001 From: Joseph Mirabel <jmirabel@laas.fr> Date: Thu, 29 Aug 2019 15:01:19 +0200 Subject: [PATCH] Remove prefix test_fcl_ from the unit-tests. --- test/CMakeLists.txt | 55 +++++++++---------- test/benchmark.cpp | 2 +- test/benchmark/test_fcl_gjk.output | 2 +- ..._box_distance.cpp => box_box_distance.cpp} | 2 +- ...test_fcl_broadphase.cpp => broadphase.cpp} | 2 +- ...test_fcl_bvh_models.cpp => bvh_models.cpp} | 2 +- ...cl_capsule_box_1.cpp => capsule_box_1.cpp} | 2 +- ...cl_capsule_box_2.cpp => capsule_box_2.cpp} | 2 +- ...apsule_capsule.cpp => capsule_capsule.cpp} | 2 +- ..._collision-bench.py => collision-bench.py} | 0 .../{test_fcl_collision.cpp => collision.cpp} | 4 +- test/{test_fcl_collision.py => collision.py} | 0 test/{test_fcl_distance.cpp => distance.cpp} | 2 +- ...wer_bound.cpp => distance_lower_bound.cpp} | 2 +- ...lower_bound.py => distance_lower_bound.py} | 0 test/{test_fcl_eigen.cpp => eigen.cpp} | 0 .../{test_fcl_frontlist.cpp => frontlist.cpp} | 2 +- ...metric_shapes.cpp => geometric_shapes.cpp} | 4 +- ...eometric_shapes.py => geometric_shapes.py} | 0 test/gjk-geometric-tools-benchmark | 2 +- test/{test_fcl_gjk.cpp => gjk.cpp} | 0 test/{test_fcl_gjk.py => gjk.py} | 0 test/{test_fcl_math.cpp => math.cpp} | 0 test/{test_fcl_obb.cpp => obb.cpp} | 0 test/{test_fcl_obb.py => obb.py} | 0 test/{test_fcl_octree.cpp => octree.cpp} | 2 +- test/{test_fcl_octree.py => octree.py} | 0 .../{test_fcl_profiling.cpp => profiling.cpp} | 2 +- ...istency.cpp => shape_mesh_consistency.cpp} | 2 +- test/{test_fcl_simple.cpp => simple.cpp} | 0 ..._sphere_capsule.cpp => sphere_capsule.cpp} | 0 test/{test_fcl_utility.cpp => utility.cpp} | 2 +- test/{test_fcl_utility.h => utility.h} | 0 33 files changed, 47 insertions(+), 48 deletions(-) rename test/{test_fcl_box_box_distance.cpp => box_box_distance.cpp} (99%) rename test/{test_fcl_broadphase.cpp => broadphase.cpp} (99%) rename test/{test_fcl_bvh_models.cpp => bvh_models.cpp} (99%) rename test/{test_fcl_capsule_box_1.cpp => capsule_box_1.cpp} (99%) rename test/{test_fcl_capsule_box_2.cpp => capsule_box_2.cpp} (99%) rename test/{test_fcl_capsule_capsule.cpp => capsule_capsule.cpp} (99%) rename test/{test_fcl_collision-bench.py => collision-bench.py} (100%) rename test/{test_fcl_collision.cpp => collision.cpp} (99%) rename test/{test_fcl_collision.py => collision.py} (100%) rename test/{test_fcl_distance.cpp => distance.cpp} (99%) rename test/{test_fcl_distance_lower_bound.cpp => distance_lower_bound.cpp} (99%) rename test/{test_fcl_distance_lower_bound.py => distance_lower_bound.py} (100%) rename test/{test_fcl_eigen.cpp => eigen.cpp} (100%) rename test/{test_fcl_frontlist.cpp => frontlist.cpp} (99%) rename test/{test_fcl_geometric_shapes.cpp => geometric_shapes.cpp} (99%) rename test/{test_fcl_geometric_shapes.py => geometric_shapes.py} (100%) rename test/{test_fcl_gjk.cpp => gjk.cpp} (100%) rename test/{test_fcl_gjk.py => gjk.py} (100%) rename test/{test_fcl_math.cpp => math.cpp} (100%) rename test/{test_fcl_obb.cpp => obb.cpp} (100%) rename test/{test_fcl_obb.py => obb.py} (100%) rename test/{test_fcl_octree.cpp => octree.cpp} (99%) rename test/{test_fcl_octree.py => octree.py} (100%) rename test/{test_fcl_profiling.cpp => profiling.cpp} (99%) rename test/{test_fcl_shape_mesh_consistency.cpp => shape_mesh_consistency.cpp} (99%) rename test/{test_fcl_simple.cpp => simple.cpp} (100%) rename test/{test_fcl_sphere_capsule.cpp => sphere_capsule.cpp} (100%) rename test/{test_fcl_utility.cpp => utility.cpp} (99%) rename test/{test_fcl_utility.h => utility.h} (100%) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6dfbafdd..e0d11653 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -21,36 +21,35 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) -add_fcl_test(test_fcl_math test_fcl_math.cpp) - -add_fcl_test(test_fcl_collision test_fcl_collision.cpp test_fcl_utility.cpp) -add_fcl_test(test_fcl_distance test_fcl_distance.cpp test_fcl_utility.cpp) -add_fcl_test(test_fcl_distance_lower_bound test_fcl_distance_lower_bound.cpp - test_fcl_utility.cpp) -add_fcl_test(test_fcl_geometric_shapes test_fcl_geometric_shapes.cpp test_fcl_utility.cpp) -#add_fcl_test(test_fcl_broadphase test_fcl_broadphase.cpp test_fcl_utility.cpp) -#add_fcl_test(test_fcl_shape_mesh_consistency test_fcl_shape_mesh_consistency.cpp test_fcl_utility.cpp) -add_fcl_test(test_fcl_frontlist test_fcl_frontlist.cpp test_fcl_utility.cpp) -#add_fcl_test(test_fcl_math test_fcl_math.cpp test_fcl_utility.cpp) - -# add_fcl_test(test_fcl_sphere_capsule test_fcl_sphere_capsule.cpp) -add_fcl_test(test_fcl_capsule_capsule test_fcl_capsule_capsule.cpp test_fcl_utility.cpp) -add_fcl_test(test_fcl_box_box_distance test_fcl_box_box_distance.cpp test_fcl_utility.cpp) -add_fcl_test(test_fcl_simple test_fcl_simple.cpp) -add_fcl_test(test_fcl_capsule_box_1 test_fcl_capsule_box_1.cpp test_fcl_utility.cpp) -add_fcl_test(test_fcl_capsule_box_2 test_fcl_capsule_box_2.cpp test_fcl_utility.cpp) -add_fcl_test(test_fcl_obb test_fcl_obb.cpp) - -add_fcl_test(test_fcl_bvh_models test_fcl_bvh_models.cpp test_fcl_utility.cpp) - -add_fcl_test(test_fcl_profiling test_fcl_profiling.cpp test_fcl_utility.cpp) -PKG_CONFIG_USE_DEPENDENCY(test_fcl_profiling assimp) - -add_fcl_test(test_fcl_gjk test_fcl_gjk.cpp) +add_fcl_test(math math.cpp) + +add_fcl_test(collision collision.cpp utility.cpp) +add_fcl_test(distance distance.cpp utility.cpp) +add_fcl_test(distance_lower_bound distance_lower_bound.cpp utility.cpp) +add_fcl_test(geometric_shapes geometric_shapes.cpp utility.cpp) +#add_fcl_test(broadphase broadphase.cpp utility.cpp) +#add_fcl_test(shape_mesh_consistency shape_mesh_consistency.cpp utility.cpp) +add_fcl_test(frontlist frontlist.cpp utility.cpp) +#add_fcl_test(math math.cpp utility.cpp) + +# add_fcl_test(sphere_capsule sphere_capsule.cpp) +add_fcl_test(capsule_capsule capsule_capsule.cpp utility.cpp) +add_fcl_test(box_box_distance box_box_distance.cpp utility.cpp) +add_fcl_test(simple simple.cpp) +add_fcl_test(capsule_box_1 capsule_box_1.cpp utility.cpp) +add_fcl_test(capsule_box_2 capsule_box_2.cpp utility.cpp) +add_fcl_test(obb obb.cpp) + +add_fcl_test(bvh_models bvh_models.cpp utility.cpp) + +add_fcl_test(profiling profiling.cpp utility.cpp) +PKG_CONFIG_USE_DEPENDENCY(profiling assimp) + +add_fcl_test(gjk gjk.cpp) if(HPP_FCL_HAVE_OCTOMAP) - add_fcl_test(test_fcl_octree test_fcl_octree.cpp test_fcl_utility.cpp) + add_fcl_test(octree octree.cpp utility.cpp) endif(HPP_FCL_HAVE_OCTOMAP) ## Benchmark -add_executable(test-benchmark benchmark.cpp test_fcl_utility.cpp) +add_executable(test-benchmark benchmark.cpp utility.cpp) target_link_libraries(test-benchmark hpp-fcl ${Boost_LIBRARIES}) diff --git a/test/benchmark.cpp b/test/benchmark.cpp index 9618d5a7..f545b7df 100644 --- a/test/benchmark.cpp +++ b/test/benchmark.cpp @@ -17,7 +17,7 @@ #include <hpp/fcl/traversal/traversal_node_setup.h> #include <hpp/fcl/traversal/traversal_node_bvhs.h> #include <../src/collision_node.h> -#include "test_fcl_utility.h" +#include "utility.h" #include "fcl_resources/config.h" #include <boost/filesystem.hpp> diff --git a/test/benchmark/test_fcl_gjk.output b/test/benchmark/test_fcl_gjk.output index aaf9b543..f20f15d5 100644 --- a/test/benchmark/test_fcl_gjk.output +++ b/test/benchmark/test_fcl_gjk.output @@ -1,4 +1,4 @@ -Result after running test_fcl_gjk in Release mode. +Result after running gjk in Release mode. nCol = 2840 nDiff = 0 diff --git a/test/test_fcl_box_box_distance.cpp b/test/box_box_distance.cpp similarity index 99% rename from test/test_fcl_box_box_distance.cpp rename to test/box_box_distance.cpp index 0613a2ed..df295a9f 100644 --- a/test/test_fcl_box_box_distance.cpp +++ b/test/box_box_distance.cpp @@ -48,7 +48,7 @@ #include <hpp/fcl/collision_object.h> #include <hpp/fcl/shape/geometric_shapes.h> -#include "test_fcl_utility.h" +#include "utility.h" typedef boost::shared_ptr <hpp::fcl::CollisionGeometry> CollisionGeometryPtr_t; diff --git a/test/test_fcl_broadphase.cpp b/test/broadphase.cpp similarity index 99% rename from test/test_fcl_broadphase.cpp rename to test/broadphase.cpp index 320b3f2a..a7a1676f 100644 --- a/test/test_fcl_broadphase.cpp +++ b/test/broadphase.cpp @@ -45,7 +45,7 @@ #include <hpp/fcl/broadphase/broadphase.h> #include <hpp/fcl/shape/geometric_shape_to_BVH_model.h> #include <hpp/fcl/math/transform.h> -#include "test_fcl_utility.h" +#include "utility.h" #if USE_GOOGLEHASH #include <sparsehash/sparse_hash_map> diff --git a/test/test_fcl_bvh_models.cpp b/test/bvh_models.cpp similarity index 99% rename from test/test_fcl_bvh_models.cpp rename to test/bvh_models.cpp index 534a1a93..b3bacfb8 100644 --- a/test/test_fcl_bvh_models.cpp +++ b/test/bvh_models.cpp @@ -50,7 +50,7 @@ #include "hpp/fcl/shape/geometric_shapes.h" #include <hpp/fcl/mesh_loader/assimp.h> #include <hpp/fcl/mesh_loader/loader.h> -#include "test_fcl_utility.h" +#include "utility.h" #include <iostream> using namespace hpp::fcl; diff --git a/test/test_fcl_capsule_box_1.cpp b/test/capsule_box_1.cpp similarity index 99% rename from test/test_fcl_capsule_box_1.cpp rename to test/capsule_box_1.cpp index cbf1851b..489c25ff 100644 --- a/test/test_fcl_capsule_box_1.cpp +++ b/test/capsule_box_1.cpp @@ -49,7 +49,7 @@ #include <hpp/fcl/collision_object.h> #include <hpp/fcl/shape/geometric_shapes.h> -#include "test_fcl_utility.h" +#include "utility.h" BOOST_AUTO_TEST_CASE(distance_capsule_box) { diff --git a/test/test_fcl_capsule_box_2.cpp b/test/capsule_box_2.cpp similarity index 99% rename from test/test_fcl_capsule_box_2.cpp rename to test/capsule_box_2.cpp index f87b6f60..8a20117a 100644 --- a/test/test_fcl_capsule_box_2.cpp +++ b/test/capsule_box_2.cpp @@ -42,7 +42,7 @@ #define CHECK_CLOSE_TO_0(x, eps) BOOST_CHECK_CLOSE ((x + 1.0), (1.0), (eps)) -#include "test_fcl_utility.h" +#include "utility.h" #include <cmath> #include <hpp/fcl/distance.h> diff --git a/test/test_fcl_capsule_capsule.cpp b/test/capsule_capsule.cpp similarity index 99% rename from test/test_fcl_capsule_capsule.cpp rename to test/capsule_capsule.cpp index 9d13e9b0..ee2a063a 100644 --- a/test/test_fcl_capsule_capsule.cpp +++ b/test/capsule_capsule.cpp @@ -49,7 +49,7 @@ #include <hpp/fcl/collision_object.h> #include <hpp/fcl/shape/geometric_shapes.h> -#include "test_fcl_utility.h" +#include "utility.h" using namespace hpp::fcl; typedef boost::shared_ptr <CollisionGeometry> CollisionGeometryPtr_t; diff --git a/test/test_fcl_collision-bench.py b/test/collision-bench.py similarity index 100% rename from test/test_fcl_collision-bench.py rename to test/collision-bench.py diff --git a/test/test_fcl_collision.cpp b/test/collision.cpp similarity index 99% rename from test/test_fcl_collision.cpp rename to test/collision.cpp index 44bb9fe8..13c9e435 100644 --- a/test/test_fcl_collision.cpp +++ b/test/collision.cpp @@ -54,7 +54,7 @@ #include <hpp/fcl/shape/geometric_shapes.h> #include <hpp/fcl/narrowphase/narrowphase.h> #include <hpp/fcl/mesh_loader/assimp.h> -#include "test_fcl_utility.h" +#include "utility.h" #include "fcl_resources/config.h" #include <boost/filesystem.hpp> @@ -585,7 +585,7 @@ BOOST_AUTO_TEST_CASE(mesh_mesh_benchmark) // Request all contacts and check that all methods give the same result. typedef boost::mpl::vector<OBB, RSS, AABB, KDOP<24>, KDOP<18>, KDOP<16>, kIOS, OBBRSS> BVs_t; - std::ofstream ofs ("./test_fcl_collision.benchmark.csv", std::ofstream::out); + std::ofstream ofs ("./collision.benchmark.csv", std::ofstream::out); bench_stream = &ofs; // without lower bound. diff --git a/test/test_fcl_collision.py b/test/collision.py similarity index 100% rename from test/test_fcl_collision.py rename to test/collision.py diff --git a/test/test_fcl_distance.cpp b/test/distance.cpp similarity index 99% rename from test/test_fcl_distance.cpp rename to test/distance.cpp index ef4bb31a..94922236 100644 --- a/test/test_fcl_distance.cpp +++ b/test/distance.cpp @@ -43,7 +43,7 @@ #include <hpp/fcl/traversal/traversal_node_bvhs.h> #include <hpp/fcl/traversal/traversal_node_setup.h> #include <../src/collision_node.h> -#include "test_fcl_utility.h" +#include "utility.h" #include <boost/timer.hpp> #include "fcl_resources/config.h" #include <boost/filesystem.hpp> diff --git a/test/test_fcl_distance_lower_bound.cpp b/test/distance_lower_bound.cpp similarity index 99% rename from test/test_fcl_distance_lower_bound.cpp rename to test/distance_lower_bound.cpp index ee825ba6..0d5a0645 100644 --- a/test/test_fcl_distance_lower_bound.cpp +++ b/test/distance_lower_bound.cpp @@ -45,7 +45,7 @@ #include <hpp/fcl/narrowphase/narrowphase.h> #include <hpp/fcl/collision.h> #include <hpp/fcl/distance.h> -# include "test_fcl_utility.h" +# include "utility.h" # include "fcl_resources/config.h" using hpp::fcl::Transform3f; diff --git a/test/test_fcl_distance_lower_bound.py b/test/distance_lower_bound.py similarity index 100% rename from test/test_fcl_distance_lower_bound.py rename to test/distance_lower_bound.py diff --git a/test/test_fcl_eigen.cpp b/test/eigen.cpp similarity index 100% rename from test/test_fcl_eigen.cpp rename to test/eigen.cpp diff --git a/test/test_fcl_frontlist.cpp b/test/frontlist.cpp similarity index 99% rename from test/test_fcl_frontlist.cpp rename to test/frontlist.cpp index 915b72b1..799b0c4a 100644 --- a/test/test_fcl_frontlist.cpp +++ b/test/frontlist.cpp @@ -44,7 +44,7 @@ #include <hpp/fcl/traversal/traversal_node_bvhs.h> #include <hpp/fcl/traversal/traversal_node_setup.h> #include <../src/collision_node.h> -#include "test_fcl_utility.h" +#include "utility.h" #include "fcl_resources/config.h" #include <boost/filesystem.hpp> diff --git a/test/test_fcl_geometric_shapes.cpp b/test/geometric_shapes.cpp similarity index 99% rename from test/test_fcl_geometric_shapes.cpp rename to test/geometric_shapes.cpp index 7adacf24..7908373e 100644 --- a/test/test_fcl_geometric_shapes.cpp +++ b/test/geometric_shapes.cpp @@ -44,7 +44,7 @@ #include <hpp/fcl/narrowphase/narrowphase.h> #include <hpp/fcl/collision.h> #include <hpp/fcl/distance.h> -#include "test_fcl_utility.h" +#include "utility.h" #include <iostream> using namespace hpp::fcl; @@ -266,7 +266,7 @@ template <typename Sa, typename Sb> void compareShapeDistance ( << resB.nearest_points[1].format(pyfmt) << '\n' ); // TODO in one case, there is a mismatch between the distances and I cannot say - // which one is correct. To visualize the case, use script test/test_fcl_geometric_shapes.py + // which one is correct. To visualize the case, use script test/geometric_shapes.py BOOST_WARN_CLOSE(resA.min_distance, resB.min_distance, tol); //BOOST_CHECK_CLOSE(resA.min_distance, resB.min_distance, tol); diff --git a/test/test_fcl_geometric_shapes.py b/test/geometric_shapes.py similarity index 100% rename from test/test_fcl_geometric_shapes.py rename to test/geometric_shapes.py diff --git a/test/gjk-geometric-tools-benchmark b/test/gjk-geometric-tools-benchmark index 4104d751..7e522128 100644 --- a/test/gjk-geometric-tools-benchmark +++ b/test/gjk-geometric-tools-benchmark @@ -1,4 +1,4 @@ -Result after running test_fcl_gjk.cpp in Release mode. +Result after running gjk.cpp in Release mode. nCol = 2831 nDiff = 41 diff --git a/test/test_fcl_gjk.cpp b/test/gjk.cpp similarity index 100% rename from test/test_fcl_gjk.cpp rename to test/gjk.cpp diff --git a/test/test_fcl_gjk.py b/test/gjk.py similarity index 100% rename from test/test_fcl_gjk.py rename to test/gjk.py diff --git a/test/test_fcl_math.cpp b/test/math.cpp similarity index 100% rename from test/test_fcl_math.cpp rename to test/math.cpp diff --git a/test/test_fcl_obb.cpp b/test/obb.cpp similarity index 100% rename from test/test_fcl_obb.cpp rename to test/obb.cpp diff --git a/test/test_fcl_obb.py b/test/obb.py similarity index 100% rename from test/test_fcl_obb.py rename to test/obb.py diff --git a/test/test_fcl_octree.cpp b/test/octree.cpp similarity index 99% rename from test/test_fcl_octree.cpp rename to test/octree.cpp index 40951efe..65507fa0 100644 --- a/test/test_fcl_octree.cpp +++ b/test/octree.cpp @@ -43,7 +43,7 @@ #include <hpp/fcl/collision.h> #include <hpp/fcl/distance.h> #include <hpp/fcl/shape/geometric_shapes.h> -#include "test_fcl_utility.h" +#include "utility.h" #include "fcl_resources/config.h" #include <boost/filesystem.hpp> diff --git a/test/test_fcl_octree.py b/test/octree.py similarity index 100% rename from test/test_fcl_octree.py rename to test/octree.py diff --git a/test/test_fcl_profiling.cpp b/test/profiling.cpp similarity index 99% rename from test/test_fcl_profiling.cpp rename to test/profiling.cpp index 2dbe337a..ee74e137 100644 --- a/test/test_fcl_profiling.cpp +++ b/test/profiling.cpp @@ -26,7 +26,7 @@ #include <hpp/fcl/collision_func_matrix.h> #include <hpp/fcl/narrowphase/narrowphase.h> #include <hpp/fcl/mesh_loader/assimp.h> -#include "test_fcl_utility.h" +#include "utility.h" #include "fcl_resources/config.h" using namespace hpp::fcl; diff --git a/test/test_fcl_shape_mesh_consistency.cpp b/test/shape_mesh_consistency.cpp similarity index 99% rename from test/test_fcl_shape_mesh_consistency.cpp rename to test/shape_mesh_consistency.cpp index f2471bf2..226f1589 100644 --- a/test/test_fcl_shape_mesh_consistency.cpp +++ b/test/shape_mesh_consistency.cpp @@ -44,7 +44,7 @@ #include <hpp/fcl/shape/geometric_shape_to_BVH_model.h> #include <hpp/fcl/distance.h> #include <hpp/fcl/collision.h> -#include "test_fcl_utility.h" +#include "utility.h" using namespace hpp::fcl; diff --git a/test/test_fcl_simple.cpp b/test/simple.cpp similarity index 100% rename from test/test_fcl_simple.cpp rename to test/simple.cpp diff --git a/test/test_fcl_sphere_capsule.cpp b/test/sphere_capsule.cpp similarity index 100% rename from test/test_fcl_sphere_capsule.cpp rename to test/sphere_capsule.cpp diff --git a/test/test_fcl_utility.cpp b/test/utility.cpp similarity index 99% rename from test/test_fcl_utility.cpp rename to test/utility.cpp index 9a22a9df..f5708d94 100644 --- a/test/test_fcl_utility.cpp +++ b/test/utility.cpp @@ -1,4 +1,4 @@ -#include "test_fcl_utility.h" +#include "utility.h" #include <hpp/fcl/collision.h> #include <hpp/fcl/distance.h> #include <cstdio> diff --git a/test/test_fcl_utility.h b/test/utility.h similarity index 100% rename from test/test_fcl_utility.h rename to test/utility.h -- GitLab