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

Added unittest to check mesh type

parent 38efdce5
Pipeline #8261 passed with stage
in 81 minutes and 25 seconds
#include <gtest/gtest.h>
#include <Unittests/unittests_common.hh>
namespace {
class OpenMeshTypeTest_Poly : public OpenMeshBasePoly {
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...
}
};
class OpenMeshTypeTest_Triangle : 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...
}
};
/*
* ====================================================================
* Define tests below
* ====================================================================
*/
TEST_F(OpenMeshTypeTest_Triangle, testTypeFunctions) {
EXPECT_TRUE(mesh_.is_trimesh()) << "Type Error!";
EXPECT_FALSE(mesh_.is_polymesh()) << "Type Error!";
}
TEST_F(OpenMeshTypeTest_Poly, testTypeFunctions) {
EXPECT_FALSE(mesh_.is_trimesh()) << "Type Error!";
EXPECT_TRUE(mesh_.is_polymesh()) << "Type Error!";
}
}
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