Notice: If you are member of any public project or group, please make sure that your GitLab username is not the same as the LRZ identifier/Kennung (see https://gitlab.lrz.de/profile/account). Please change your username if necessary. For more information see the section "Public projects / Öffentliche Projekte" at https://doku.lrz.de/display/PUBLIC/GitLab . Thank you!

Commit d22fa4c7 authored by Jakob Weiss's avatar Jakob Weiss

Fixed failing tests broken by Introduction of writable data handles

parent 5774ef3c
......@@ -73,13 +73,13 @@ protected:
TEST_F(DataContainerTest, miscellaneousTest) {
EXPECT_EQ("dc0", this->_dc0->getName());
EXPECT_EQ(nullptr, this->_dc0->getData("data1").getData());
ASSERT_TRUE(nullptr == this->_dc0->getData("data1").getData());
this->_dc0->addData("data1", this->_data);
EXPECT_EQ(this->_data, this->_dc0->getData("data1").getData());
ASSERT_TRUE(this->_data == this->_dc0->getData("data1").getData());
this->_dc0->addDataHandle("data2", DataHandle(this->_data));
this->_dc0->removeData("data1");
EXPECT_EQ(nullptr, this->_dc0->getData("data1").getData());
ASSERT_TRUE(nullptr == this->_dc0->getData("data1").getData());
EXPECT_FALSE(this->_dc0->hasData("data1"));
EXPECT_TRUE(this->_dc0->hasData("data2"));
}
......@@ -93,7 +93,7 @@ TEST_F(DataContainerTest, getDataHandlesCopyTest) {
EXPECT_EQ(1U, this->_dc0->getDataHandlesCopy().size());
std::pair<std::string, DataHandle> pair = this->_dc0->getDataHandlesCopy()[0];
EXPECT_EQ("data1", pair.first);
EXPECT_EQ(this->_data, pair.second.getData());
ASSERT_TRUE(this->_data == pair.second.getData());
}
/**
......@@ -108,7 +108,7 @@ TEST_F(DataContainerTest, concurrentAccessTest) {
AbstractData *someData = new ImageData(2, cgt::svec3(1,2,1), 4);
this->_dc0->addData("data1", someData);
EXPECT_EQ(someData, this->_dc0->getData("data1").getData());
EXPECT_NE(_data, this->_dc0->getData("data1").getData());
EXPECT_EQ(_data, dh.getData());
ASSERT_TRUE(someData == this->_dc0->getData("data1").getData());
ASSERT_FALSE(_data == this->_dc0->getData("data1").getData());
ASSERT_TRUE(_data == dh.getData());
}
......@@ -67,10 +67,10 @@ protected:
TEST_F(DataHandleTest, getDataTest) {
ASSERT_TRUE(nullptr == _dh0.getData());
EXPECT_EQ(_dh1.getData(), _dh2.getData());
EXPECT_EQ(_dh1.getData(), _dh3.getData());
ASSERT_TRUE(_dh1.getData() == _dh2.getData());
ASSERT_TRUE(_dh1.getData() == _dh3.getData());
EXPECT_EQ(nullptr, _dh4.getData());
ASSERT_TRUE(_dh4.getData() == nullptr);
}
TEST_F(DataHandleTest, getTimestampTest) {
......
......@@ -78,7 +78,7 @@ TEST_F(ImageSeriesTest, miscellaneousTest) {
_imgSeries3.addImage(_image);
EXPECT_EQ(2U, _imgSeries3.getNumImages());
EXPECT_EQ(_dh.getData(), _imgSeries3.getImage(_imgSeries3.getNumImages()-1).getData());
ASSERT_TRUE(_dh.getData() == _imgSeries3.getImage(_imgSeries3.getNumImages()-1).getData());
}
......
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