readOFF.cpp 436 B

12345678910111213
  1. #include <test_common.h>
  2. TEST(readOFF, simple) {
  3. Eigen::MatrixXd V;
  4. Eigen::MatrixXi F;
  5. // wait... so this is actually testing test_common::load_mesh not readOFF
  6. // directly...
  7. test_common::load_mesh("cube.off", V, F);
  8. ASSERT_EQ(8, V.rows()); //has 8 vertex
  9. ASSERT_EQ(3, V.cols()); //3D coordinates
  10. ASSERT_EQ(12, F.rows()); //has 6*2=12 facets
  11. ASSERT_EQ(3, F.cols()); //facets are triangles
  12. }