From 443fcd78a00b16ac5813de1ab1e94779ce098e1e Mon Sep 17 00:00:00 2001 From: Alexandra Heuschling Date: Wed, 6 Jan 2021 23:29:58 +0100 Subject: [PATCH] rename data type --- src/Unittests/unittests_read_write_OM.cc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Unittests/unittests_read_write_OM.cc b/src/Unittests/unittests_read_write_OM.cc index 06c64d60..97535789 100644 --- a/src/Unittests/unittests_read_write_OM.cc +++ b/src/Unittests/unittests_read_write_OM.cc @@ -4,8 +4,7 @@ #include #include - -struct MyData_test{ +struct RegisteredDataType{ int ival; double dval; bool bval; @@ -17,9 +16,9 @@ namespace OpenMesh { namespace IO { - template <> struct binary + template <> struct binary { - typedef MyData_test value_type; + typedef RegisteredDataType value_type; static const bool is_streamable = true; // return binary size of the value static size_t size_of(void) @@ -32,7 +31,7 @@ namespace IO } static std::string string_for_value_type(void) { - return "MyData_test"; + return "RegisteredDataType"; } static size_t store(std::ostream& _os, const value_type& _v, bool _swap=false) { @@ -1535,7 +1534,6 @@ std::string get_type_string(std::vector) { return "std::vector of template std::string get_type_string(OpenMesh::VectorT) { return "OM vector of dimension " + std::to_string(Dim) + " of type " + get_type_string(T()); } - template T get_value(int seed, T, int seed2 = 0) { @@ -1803,8 +1801,8 @@ TEST_F(OpenMeshReadWriteOM, PropertyFromString) { std::string MyData_prop_name = "my MyData prop"; - OpenMesh::create_property_from_string(mesh_, "MyData_test", MyData_prop_name); - bool has_myData_prop = OpenMesh::hasProperty(mesh_, MyData_prop_name.c_str()); + OpenMesh::create_property_from_string(mesh_, "RegisteredDataType", MyData_prop_name); + bool has_myData_prop = OpenMesh::hasProperty(mesh_, MyData_prop_name.c_str()); EXPECT_TRUE(has_myData_prop); } } @@ -1812,4 +1810,4 @@ TEST_F(OpenMeshReadWriteOM, PropertyFromString) } OM_REGISTER_PROPERTY_TYPE(std::vector) -OM_REGISTER_PROPERTY_TYPE(MyData_test) +OM_REGISTER_PROPERTY_TYPE(RegisteredDataType)