#include #include #include class triangle_triangle_adjacency : public ::testing::TestWithParam {}; TEST_CASE("triangle_triangle_adjacency: dot", "[igl]") { const auto test_case = [](const std::string ¶m) { Eigen::MatrixXd V, TC; Eigen::MatrixXi F,TT,TTi; // Load example mesh: GetParam() will be name of mesh file test_common::load_mesh(param, V, F, TC); igl::triangle_triangle_adjacency(F,TT,TTi); REQUIRE (TT.rows() == F.rows()); REQUIRE (TTi.rows() == F.rows()); REQUIRE (TT.cols() == F.cols()); REQUIRE (TTi.cols() == F.cols()); for(int f = 0;f= 0) { REQUIRE (F.rows() > TT(f,c)); REQUIRE (0 <= TTi(f,c)); REQUIRE (3 > TTi(f,c)); REQUIRE (f == TT(TT(f,c),TTi(f,c))); } } } // REQUIRE (b == a); // REQUIRE (a==b); // REQUIRE(a == Approx(b).margin(1e-15)) // REQUIRE (1e-12 > a); }; test_common::run_test_cases(test_common::manifold_meshes(), test_case); } INSTANTIATE_TEST_CASE_P ( manifold_meshes, triangle_triangle_adjacency, ::testing::ValuesIn(test_common::manifold_meshes()), test_common::string_test_name );