aboutsummaryrefslogtreecommitdiffstats
path: root/document/src/tests
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-11-07 20:38:52 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-11-09 10:33:49 +0000
commit01cce7fcf6a68f268c8a61e93ea4a0d76a775954 (patch)
tree4a881b9fc4888f02cce5f1d02f9b3897820ba116 /document/src/tests
parentdc50de961734b229cd4bcb0fb6e515d94df82202 (diff)
Removed unused IFieldBase of Serializer/Deserializer interface.
Many years ago there were a big plan. But it went nowehere. So let us GC it instead of lying around polluting and bloating the code.
Diffstat (limited to 'document/src/tests')
-rw-r--r--document/src/tests/documentupdatetestcase.cpp22
-rw-r--r--document/src/tests/fieldsettest.cpp2
2 files changed, 12 insertions, 12 deletions
diff --git a/document/src/tests/documentupdatetestcase.cpp b/document/src/tests/documentupdatetestcase.cpp
index 1863194ab73..5fd62957f65 100644
--- a/document/src/tests/documentupdatetestcase.cpp
+++ b/document/src/tests/documentupdatetestcase.cpp
@@ -467,28 +467,28 @@ TEST(DocumentUpdateTest, testReadSerializedFile)
EXPECT_EQ(*type, upd.getType());
// Verify assign value update.
- FieldUpdate serField = upd.getUpdates()[1];
- EXPECT_EQ(serField.getField().getId(), type->getField("intfield").getId());
+ const FieldUpdate & serField1 = upd.getUpdates()[1];
+ EXPECT_EQ(serField1.getField().getId(), type->getField("intfield").getId());
- const ValueUpdate* serValue = &serField[0];
+ const ValueUpdate* serValue = &serField1[0];
ASSERT_EQ(serValue->getType(), ValueUpdate::Assign);
const AssignValueUpdate* assign(static_cast<const AssignValueUpdate*>(serValue));
EXPECT_EQ(IntFieldValue(4), static_cast<const IntFieldValue&>(assign->getValue()));
// Verify clear field update.
- serField = upd.getUpdates()[2];
- EXPECT_EQ(serField.getField().getId(), type->getField("floatfield").getId());
+ const FieldUpdate & serField2 = upd.getUpdates()[2];
+ EXPECT_EQ(serField2.getField().getId(), type->getField("floatfield").getId());
- serValue = &serField[0];
+ serValue = &serField2[0];
EXPECT_EQ(serValue->getType(), ValueUpdate::Clear);
EXPECT_TRUE(serValue->inherits(ClearValueUpdate::classId));
// Verify add value update.
- serField = upd.getUpdates()[0];
- EXPECT_EQ(serField.getField().getId(), type->getField("arrayoffloatfield").getId());
+ const FieldUpdate & serField3 = upd.getUpdates()[0];
+ EXPECT_EQ(serField3.getField().getId(), type->getField("arrayoffloatfield").getId());
- serValue = &serField[0];
+ serValue = &serField3[0];
ASSERT_EQ(serValue->getType(), ValueUpdate::Add);
const AddValueUpdate* add = static_cast<const AddValueUpdate*>(serValue);
@@ -496,7 +496,7 @@ TEST(DocumentUpdateTest, testReadSerializedFile)
EXPECT_TRUE(value->inherits(FloatFieldValue::classId));
EXPECT_FLOAT_EQ(value->getAsFloat(), 5.00f);
- serValue = &serField[1];
+ serValue = &serField3[1];
ASSERT_EQ(serValue->getType(), ValueUpdate::Add);
add = static_cast<const AddValueUpdate*>(serValue);
@@ -504,7 +504,7 @@ TEST(DocumentUpdateTest, testReadSerializedFile)
EXPECT_TRUE(value->inherits(FloatFieldValue::classId));
EXPECT_FLOAT_EQ(value->getAsFloat(), 4.23f);
- serValue = &serField[2];
+ serValue = &serField3[2];
ASSERT_EQ(serValue->getType(), ValueUpdate::Add);
add = static_cast<const AddValueUpdate*>(serValue);
diff --git a/document/src/tests/fieldsettest.cpp b/document/src/tests/fieldsettest.cpp
index 8f77bfd2c0d..a3b78e6081f 100644
--- a/document/src/tests/fieldsettest.cpp
+++ b/document/src/tests/fieldsettest.cpp
@@ -281,7 +281,7 @@ TEST(FieldCollectionTest, testHash ) {
}
TEST(FieldTest, testSizeOf) {
- EXPECT_EQ(sizeof(Field), 96);
+ EXPECT_EQ(sizeof(Field), 88);
}
} // document