1 #include <gtest/gtest.h> 2 3 #include <Unittests/unittests_common.hh> 4 5 6 namespace { 7 8 9 class OpenMeshTypeTest_Poly : public OpenMeshBasePoly { 10 11 protected: 12 13 // This function is called before each test is run SetUp()14 virtual void SetUp() { 15 16 // Do some initial stuff with the member data here... 17 } 18 19 // This function is called after all tests are through TearDown()20 virtual void TearDown() { 21 22 // Do some final stuff with the member data here... 23 } 24 }; 25 26 class OpenMeshTypeTest_Triangle : public OpenMeshBase { 27 28 protected: 29 30 // This function is called before each test is run SetUp()31 virtual void SetUp() { 32 33 // Do some initial stuff with the member data here... 34 } 35 36 // This function is called after all tests are through TearDown()37 virtual void TearDown() { 38 39 // Do some final stuff with the member data here... 40 } 41 42 }; 43 44 45 /* 46 * ==================================================================== 47 * Define tests below 48 * ==================================================================== 49 */ 50 TEST_F(OpenMeshTypeTest_Triangle,testTypeFunctions)51TEST_F(OpenMeshTypeTest_Triangle, testTypeFunctions) { 52 53 54 EXPECT_TRUE(mesh_.is_trimesh()) << "Type Error!"; 55 EXPECT_FALSE(mesh_.is_polymesh()) << "Type Error!"; 56 } 57 58 TEST_F(OpenMeshTypeTest_Poly,testTypeFunctions)59TEST_F(OpenMeshTypeTest_Poly, testTypeFunctions) { 60 61 62 EXPECT_FALSE(mesh_.is_trimesh()) << "Type Error!"; 63 EXPECT_TRUE(mesh_.is_polymesh()) << "Type Error!"; 64 } 65 66 67 } 68