diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-03-04 12:10:25 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-03-04 13:01:43 +0000 |
commit | 46f44aed6e46f5a81a5f7c01745f97ec31c33d9f (patch) | |
tree | 4d5fb00aa47ab4ee76caddb574f26291a87c2854 /document/src/tests/datatype | |
parent | 19c86cb3ebac5b36630eb2a83281bb0d037a9070 (diff) |
Remove clone from DataType.
Diffstat (limited to 'document/src/tests/datatype')
-rw-r--r-- | document/src/tests/datatype/datatype_test.cpp | 16 | ||||
-rw-r--r-- | document/src/tests/datatype/referencedatatype_test.cpp | 6 |
2 files changed, 0 insertions, 22 deletions
diff --git a/document/src/tests/datatype/datatype_test.cpp b/document/src/tests/datatype/datatype_test.cpp index b3da01dfec3..84c72127735 100644 --- a/document/src/tests/datatype/datatype_test.cpp +++ b/document/src/tests/datatype/datatype_test.cpp @@ -19,22 +19,6 @@ void assign(S &lhs, const S &rhs) { lhs = rhs; } -TEST("require that ArrayDataType can be assigned to.") { - ArrayDataType type1(*DataType::STRING); - ArrayDataType type2(*DataType::INT); - assign(type1, type1); - EXPECT_EQUAL(*DataType::STRING, type1.getNestedType()); - type1 = type2; - EXPECT_EQUAL(*DataType::INT, type1.getNestedType()); -} - -TEST("require that ArrayDataType can be cloned.") { - ArrayDataType type1(*DataType::STRING); - std::unique_ptr<ArrayDataType> type2(type1.clone()); - ASSERT_TRUE(type2.get()); - EXPECT_EQUAL(*DataType::STRING, type2->getNestedType()); -} - TEST("require that assignment operator works for LongFieldValue") { LongFieldValue val; val = "1"; diff --git a/document/src/tests/datatype/referencedatatype_test.cpp b/document/src/tests/datatype/referencedatatype_test.cpp index 9dba3541594..d558d5aff1a 100644 --- a/document/src/tests/datatype/referencedatatype_test.cpp +++ b/document/src/tests/datatype/referencedatatype_test.cpp @@ -43,12 +43,6 @@ TEST_F("operator== checks document type and type ID", Fixture) { EXPECT_NOT_EQUAL(f.refType, refWithSameTypeDifferentId); } -TEST_F("clone() creates new type instance equal to old instance", Fixture) { - std::unique_ptr<ReferenceDataType> cloned(f.refType.clone()); - ASSERT_TRUE(cloned.get() != nullptr); - EXPECT_EQUAL(f.refType, *cloned); -} - TEST_F("print() emits type name and id", Fixture) { std::ostringstream ss; f.refType.print(ss, true, ""); |