Jérémie Dumas 6 жил өмнө
parent
commit
ac8b269300

+ 1 - 1
tests/include/igl/copyleft/cgal/CSGTree.cpp

@@ -2,7 +2,7 @@
 
 #include <igl/copyleft/cgal/CSGTree.h>
 
-TEST_CASE("CSGTree: extrusion", "[igl/copyleft/cgal]")
+TEST_CASE("CSGTree: extrusion", "[igl/copyleft/cgal]") {
     Eigen::MatrixXd V;
     Eigen::MatrixXi F;
     test_common::load_mesh("extrusion.obj", V, F);

+ 2 - 3
tests/include/igl/copyleft/cgal/hausdorff.cpp

@@ -14,8 +14,8 @@ TEST_CASE("hausdorff: knightVScheburashka", "[igl/copyleft/cgal]")
   //typedef CGAL::Epeck Kernel;
   typedef CGAL::Simple_cartesian<double> Kernel;
   CGAL::AABB_tree<
-    CGAL::AABB_traits<Kernel, 
-      CGAL::AABB_triangle_primitive<Kernel, 
+    CGAL::AABB_traits<Kernel,
+      CGAL::AABB_triangle_primitive<Kernel,
         typename std::vector<CGAL::Triangle_3<Kernel> >::iterator
       >
     >
@@ -52,4 +52,3 @@ TEST_CASE("hausdorff: knightVScheburashka", "[igl/copyleft/cgal]")
     break;
   }
 }
-

+ 10 - 4
tests/include/igl/copyleft/cgal/order_facets_around_edges.cpp

@@ -10,7 +10,7 @@
 #include <igl/readDMAT.h>
 #include <igl/per_face_normals.h>
 
-namespace order_facets_around_edges_test {
+namespace {
 
 typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
 
@@ -83,7 +83,10 @@ void assert_order(
     }
 }
 
+} // anonymous namespace
+
 TEST_CASE("copyleft_cgal_order_facets_around_edges: Simple", "[igl/copyleft/cgal]")
+{
     Eigen::MatrixXd V(4, 3);
     V << 0.0, 0.0, 0.0,
          1.0, 0.0, 0.0,
@@ -97,6 +100,7 @@ TEST_CASE("copyleft_cgal_order_facets_around_edges: Simple", "[igl/copyleft/cgal
 }
 
 TEST_CASE("copyleft_cgal_order_facets_around_edges: TripletFaces", "[igl/copyleft/cgal]")
+{
     Eigen::MatrixXd V(5, 3);
     V << 0.0, 0.0, 0.0,
          1.0, 0.0, 0.0,
@@ -112,6 +116,7 @@ TEST_CASE("copyleft_cgal_order_facets_around_edges: TripletFaces", "[igl/copylef
 }
 
 TEST_CASE("copyleft_cgal_order_facets_around_edges: DuplicatedFaces", "[igl/copyleft/cgal]")
+{
     Eigen::MatrixXd V(5, 3);
     V << 0.0, 0.0, 0.0,
          1.0, 0.0, 0.0,
@@ -128,6 +133,7 @@ TEST_CASE("copyleft_cgal_order_facets_around_edges: DuplicatedFaces", "[igl/copy
 }
 
 TEST_CASE("copyleft_cgal_order_facets_around_edges: MultipleDuplicatedFaces", "[igl/copyleft/cgal]")
+{
     Eigen::MatrixXd V(5, 3);
     V << 0.0, 0.0, 0.0,
          1.0, 0.0, 0.0,
@@ -146,6 +152,7 @@ TEST_CASE("copyleft_cgal_order_facets_around_edges: MultipleDuplicatedFaces", "[
 }
 
 TEST_CASE("copyleft_cgal_order_facets_around_edges: Debug", "[igl/copyleft/cgal]")
+{
     Eigen::MatrixXd V(5, 3);
     V <<
         -44.3205080756887781, 4.22994972382184579e-15, 75,
@@ -163,6 +170,7 @@ TEST_CASE("copyleft_cgal_order_facets_around_edges: Debug", "[igl/copyleft/cgal]
 }
 
 TEST_CASE("copyleft_cgal_order_facets_around_edges: Debug2", "[igl/copyleft/cgal]")
+{
     Eigen::MatrixXd V(5, 3);
     V <<
         -22.160254037844382, 38.3826859021798441, 75,
@@ -179,6 +187,7 @@ TEST_CASE("copyleft_cgal_order_facets_around_edges: Debug2", "[igl/copyleft/cgal
 }
 
 TEST_CASE("copyleft_cgal_order_facets_around_edges: NormalSensitivity", "[igl/copyleft/cgal]")
+
     // This example shows that epsilon difference in normal vectors could
     // results in very different ordering of facets.
 
@@ -190,6 +199,3 @@ TEST_CASE("copyleft_cgal_order_facets_around_edges: NormalSensitivity", "[igl/co
     assert_order(V, F, 223, 224, {2, 0, 3, 1}, "duplicated_faces_N1.dmat");
     assert_order(V, F, 223, 224, {0, 3, 2, 1}, "duplicated_faces_N2.dmat");
 }
-
-
-}

+ 8 - 3
tests/include/igl/copyleft/cgal/outer_facet.cpp

@@ -2,7 +2,7 @@
 
 #include <igl/copyleft/cgal/outer_facet.h>
 
-namespace OuterFacetHelper {
+namespace {
 
 /**
  * Check if the outer facet is indeed valid.
@@ -16,7 +16,10 @@ void assert_outer_facet_is_correct(
     // Todo.
 }
 
+} // anonymous namespace
+
 TEST_CASE("OuterFacet: Simple", "[igl/copyleft/cgal]")
+{
     Eigen::MatrixXd V;
     Eigen::MatrixXi F;
     test_common::load_mesh("cube.obj", V, F);
@@ -35,6 +38,7 @@ TEST_CASE("OuterFacet: Simple", "[igl/copyleft/cgal]")
 }
 
 TEST_CASE("OuterFacet: DuplicatedOppositeFaces", "[igl/copyleft/cgal]")
+{
     Eigen::MatrixXd V;
     Eigen::MatrixXi F1;
     test_common::load_mesh("cube.obj", V, F1);
@@ -57,6 +61,7 @@ TEST_CASE("OuterFacet: DuplicatedOppositeFaces", "[igl/copyleft/cgal]")
 }
 
 TEST_CASE("OuterFacet: FullyDegnerated", "[igl/copyleft/cgal]")
+{
     Eigen::MatrixXd V;
     Eigen::MatrixXi F;
     test_common::load_mesh("degenerated.obj", V, F);
@@ -73,6 +78,7 @@ TEST_CASE("OuterFacet: FullyDegnerated", "[igl/copyleft/cgal]")
 }
 
 TEST_CASE("OuterFacet: InvertedNormal", "[igl/copyleft/cgal]")
+{
     Eigen::MatrixXd V;
     Eigen::MatrixXi F;
     test_common::load_mesh("cube.obj", V, F);
@@ -90,6 +96,7 @@ TEST_CASE("OuterFacet: InvertedNormal", "[igl/copyleft/cgal]")
 }
 
 TEST_CASE("OuterFacet: SliverTet", "[igl/copyleft/cgal]")
+{
     Eigen::MatrixXd V;
     Eigen::MatrixXi F;
     test_common::load_mesh("sliver_tet.ply", V, F);
@@ -104,5 +111,3 @@ TEST_CASE("OuterFacet: SliverTet", "[igl/copyleft/cgal]")
     REQUIRE (F.rows() > fid);
     REQUIRE (!flipped);
 }
-
-}

+ 1 - 0
tests/include/igl/copyleft/cgal/outer_hull.cpp

@@ -4,6 +4,7 @@
 #include <igl/copyleft/cgal/outer_hull.h>
 
 TEST_CASE("OuterHull: CubeWithFold", "[igl/copyleft/cgal]")
+{
     Eigen::MatrixXd V;
     Eigen::MatrixXi F;
     test_common::load_mesh("cube_with_fold.ply", V, F);

+ 2 - 0
tests/include/igl/copyleft/cgal/peel_outer_hull_layers.cpp

@@ -12,6 +12,7 @@
 #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
 
 TEST_CASE("copyleft_cgal_peel_outer_hull_layers: TwoCubes", "[igl/copyleft/cgal]")
+{
     Eigen::MatrixXd V;
     Eigen::MatrixXi F;
     test_common::load_mesh("two-boxes-bad-self-union.ply", V, F);
@@ -51,6 +52,7 @@ TEST_CASE("copyleft_cgal_peel_outer_hull_layers: TwoCubes", "[igl/copyleft/cgal]
 }
 
 TEST_CASE("PeelOuterHullLayers: CubeWithFold", "[igl/copyleft/cgal]")
+{
     Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> V;
     Eigen::MatrixXi F;
     test_common::load_mesh("cube_with_fold.ply", V, F);

+ 3 - 2
tests/include/igl/copyleft/cgal/points_inside_component.cpp

@@ -6,6 +6,7 @@
 namespace PointInsideComponentHelper {
 
 TEST_CASE("PointInsideComponent: simple", "[igl/copyleft/cgal]")
+{
     Eigen::MatrixXd V1;
     Eigen::MatrixXi F1;
     test_common::load_mesh("cube.obj", V1, F1);
@@ -25,6 +26,7 @@ TEST_CASE("PointInsideComponent: simple", "[igl/copyleft/cgal]")
 }
 
 TEST_CASE("PointInsideComponent: near_boundary", "[igl/copyleft/cgal]")
+{
     Eigen::MatrixXd V1;
     Eigen::MatrixXi F1;
     test_common::load_mesh("cube.obj", V1, F1);
@@ -49,6 +51,7 @@ TEST_CASE("PointInsideComponent: near_boundary", "[igl/copyleft/cgal]")
 }
 
 TEST_CASE("PointInsideComponent: near_corner", "[igl/copyleft/cgal]")
+{
     Eigen::MatrixXd V1;
     Eigen::MatrixXi F1;
     test_common::load_mesh("cube.obj", V1, F1);
@@ -80,5 +83,3 @@ TEST_CASE("PointInsideComponent: near_corner", "[igl/copyleft/cgal]")
     CHECK_NOTHROW (igl::copyleft::cgal::points_inside_component(V1, F1, P_in, inside));
     REQUIRE ((inside.array()==1).all());
 }
-
-}

+ 1 - 0
tests/include/igl/copyleft/cgal/remesh_self_intersections.cpp

@@ -7,6 +7,7 @@
 #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
 
 TEST_CASE("RemeshSelfIntersections: CubeWithFold", "[igl/copyleft/cgal]")
+{
     Eigen::MatrixXd V;
     Eigen::MatrixXi F;
     test_common::load_mesh("cube_with_fold.ply", V, F);