Commit aaf0b008 authored by Jan Möbius's avatar Jan Möbius

Stripifier unittest

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@931 fdac6126-5c0c-442c-9429-916003d36597
parent 68cf7409
......@@ -13,6 +13,7 @@
#include "unittests_mc_decimater.hh"
#include "unittests_mesh_dual.hh"
#include "unittests_mixed_decimater.hh"
#include "unittests_stripifier.hh"
#include "unittests_subdivider_uniform.hh"
#include "unittests_subdivider_adaptive.hh"
#include "unittests_trimesh_normal_calculations.hh"
......
#ifndef INCLUDE_UNITTESTS_STRIPIFIER_HH
#define INCLUDE_UNITTESTS_STRIPIFIER_HH
#include <gtest/gtest.h>
#include <Unittests/unittests_common.hh>
#include <OpenMesh/Tools/Utils/StripifierT.hh>
class OpenMeshStripify : public OpenMeshBase {
protected:
// This function is called before each test is run
virtual void SetUp() {
// Do some initial stuff with the member data here...
}
// This function is called after all tests are through
virtual void TearDown() {
// Do some final stuff with the member data here...
}
// Member already defined in OpenMeshBase
//Mesh mesh_;
};
/*
* ====================================================================
* Define tests below
* ====================================================================
*/
/*
*/
TEST_F(OpenMeshStripify, Stripify) {
bool ok = OpenMesh::IO::read_mesh(mesh_, "cube1.off");
ASSERT_TRUE(ok);
OpenMesh::StripifierT<Mesh> stripifier(mesh_);
size_t strips = stripifier.stripify();
EXPECT_EQ(1269u, strips) << "The number of computed strips is not correct!";
EXPECT_TRUE(stripifier.is_valid()) << "Strips not computed!";
}
#endif // INCLUDE GUARD
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment