From 429ddd353933a4f24e7eb6ffa474601e3b0a2625 Mon Sep 17 00:00:00 2001 From: Timm Fitschen <t.fitschen@indiscale.com> Date: Fri, 11 Feb 2022 23:30:03 +0100 Subject: [PATCH] Fix unit tests --- include/caosdb/entity.h | 4 +++- test/test_data_type.cpp | 6 ------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/include/caosdb/entity.h b/include/caosdb/entity.h index 4d42155..32722a8 100644 --- a/include/caosdb/entity.h +++ b/include/caosdb/entity.h @@ -707,7 +707,9 @@ public: : static_cast<ProtoDataType *>(nullptr)) { properties.wrapped = this->wrapped->mutable_properties(); parents.wrapped = this->wrapped->mutable_parents(); - file_descriptor.wrapped = this->wrapped->mutable_file_descriptor(); + if(this->wrapped->has_file_descriptor()) { + file_descriptor.wrapped = this->wrapped->mutable_file_descriptor(); + } }; explicit inline Entity(EntityResponse *response) : Entity(response->mutable_entity()) { this->errors.wrapped->Swap(response->mutable_errors()); diff --git a/test/test_data_type.cpp b/test/test_data_type.cpp index bccc853..02861d3 100644 --- a/test/test_data_type.cpp +++ b/test/test_data_type.cpp @@ -25,15 +25,9 @@ #include "caosdb/entity/v1/main.pb.h" // for DataType, Ato... #include "caosdb/logging.h" // for CAOSDB_LOG_DEBUG #include "caosdb/protobuf_helper.h" // for CAOSDB_DEBUG_... -#include <boost/log/core/record.hpp> // for record -#include <boost/log/detail/attachable_sstream_buf.hpp> // for basic_ostring... -#include <boost/log/sources/record_ostream.hpp> // for operator<< -#include <boost/preprocessor/seq/limits/enum_256.hpp> // for BOOST_PP_SEQ_... -#include <boost/preprocessor/seq/limits/size_256.hpp> // for BOOST_PP_SEQ_... #include <gtest/gtest-message.h> // for Message #include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApi... #include <gtest/gtest_pred_impl.h> // for AssertionResult, Test -#include <iosfwd> // for streamsize #include <map> // for map, operator!= #include <string> // for allocator #include <utility> // for pair -- GitLab