Split up unit tests into multiple compile units.

Added mesh_cast unit test.


git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@958 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Hans-Christian Ebke
2013-09-20 14:21:08 +00:00
parent 5094916ff6
commit bbb3a55ee7
38 changed files with 140 additions and 184 deletions

View File

@@ -0,0 +1,50 @@
#include <gtest/gtest.h>
#include <Unittests/unittests_common.hh>
#include <OpenMesh/Tools/Utils/StripifierT.hh>
namespace {
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!";
}
}