From f4f07472c6e1f2983f892d9a321dd9646beda722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Thu, 11 Jun 2015 14:03:09 +0000 Subject: [PATCH] Added c++11 test file git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1282 fdac6126-5c0c-442c-9429-916003d36597 --- src/Unittests/unittests_cpp_11_features.cc | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 src/Unittests/unittests_cpp_11_features.cc diff --git a/src/Unittests/unittests_cpp_11_features.cc b/src/Unittests/unittests_cpp_11_features.cc new file mode 100644 index 00000000..682f11d0 --- /dev/null +++ b/src/Unittests/unittests_cpp_11_features.cc @@ -0,0 +1,72 @@ + +#include +#include +#include + +namespace { + +class OpenMesh_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... + } + + // Member already defined in OpenMeshBase + //Mesh mesh_; +}; + +class OpenMesh_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... + } + + // Member already defined in OpenMeshBase + //Mesh mesh_; +}; + + + +/* + * ==================================================================== + * Define tests below + * ==================================================================== + */ + +#if __cplusplus > 199711L or __GXX_EXPERIMENTAL_CXX0X__ + +/* + */ +TEST_F(OpenMesh_Triangle, cpp11_initializer_test) { + + OpenMesh::Vec3d vec1 = { 1, 0, 0}; + OpenMesh::Vec3d vec2 = {0, 0.777971, 0.996969}; + + + EXPECT_EQ( dot(vec1,vec2) ,0.0 ); + +} + +#endif + +}