Commit 65f69393 authored by Cedric CAFFY's avatar Cedric CAFFY
Browse files

Changed the StorageClass operator== so that it only compare on the names of the storage classes

parent e0b5936d
......@@ -34,7 +34,7 @@ StorageClass::StorageClass():
// operator==
//------------------------------------------------------------------------------
bool StorageClass::operator==(const StorageClass &rhs) const {
return diskInstance==rhs.diskInstance && name==rhs.name;
return name==rhs.name;
}
//------------------------------------------------------------------------------
......
......@@ -47,9 +47,9 @@ struct StorageClass {
* this one.
*
* Please note that two StorageClass objects are considered equal if and only
* if both their diskInstance and name member-variables match, i.e.
* if their name member-variables match, i.e.
*
* diskInstance==rhs.diskInstance && name==rhs.name;
* name==rhs.name;
*
* All other member-variables are intentionally ignored by this equality
* operator.
......
......@@ -100,12 +100,6 @@ TEST_F(cta_common_dataStructures_StorageClassTest, equality_different_objects_di
ASSERT_EQ(m_storageClass1DiskInstance1, m_storageClass1DiskInstance1EffectiveCopy);
}
TEST_F(cta_common_dataStructures_StorageClassTest, inequality_different_disk_instance) {
using namespace cta::common::dataStructures;
ASSERT_NE(m_storageClass1DiskInstance1, m_storageClass1DiskInstance2);
}
TEST_F(cta_common_dataStructures_StorageClassTest, inequality_different_name) {
using namespace cta::common::dataStructures;
......
Supports Markdown
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