diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-03-07 08:14:04 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-03-07 08:14:04 +0000 |
commit | e658f2c3499901cf7e7750ca3d5be0e6e6953e8c (patch) | |
tree | 6b297ebd65ab7ea1c7970420982c0a3f6f9c2123 /document/src/tests/documentselectparsertest.cpp | |
parent | 2e05df2de19c2d5b87befa2ee6c4fd182dcb5630 (diff) |
GC redundant convenience wasy of assigning primitive field values.
Diffstat (limited to 'document/src/tests/documentselectparsertest.cpp')
-rw-r--r-- | document/src/tests/documentselectparsertest.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/document/src/tests/documentselectparsertest.cpp b/document/src/tests/documentselectparsertest.cpp index 8308c3bc693..3d2e4e983d7 100644 --- a/document/src/tests/documentselectparsertest.cpp +++ b/document/src/tests/documentselectparsertest.cpp @@ -153,18 +153,18 @@ DocumentSelectParserTest::createDocs() // Add some arrays and structs to doc 1 { StructFieldValue sval(_doc.back()->getField("mystruct").getDataType()); - sval.set("key", 14); - sval.set("value", "structval"); + sval.setValue("key", std::make_unique<IntFieldValue>(14)); + sval.setValue("value", std::make_unique<StringFieldValue>("structval")); _doc.back()->setValue("mystruct", sval); ArrayFieldValue aval(_doc.back()->getField("structarray").getDataType()); { StructFieldValue sval1(aval.getNestedType()); - sval1.set("key", 15); - sval1.set("value", "structval1"); + sval1.setValue("key", std::make_unique<IntFieldValue>(15)); + sval1.setValue("value", std::make_unique<StringFieldValue>("structval1")); StructFieldValue sval2(aval.getNestedType()); - sval2.set("key", 16); - sval2.set("value", "structval2"); + sval2.setValue("key", std::make_unique<IntFieldValue>(16)); + sval2.setValue("value", std::make_unique<StringFieldValue>("structval2")); aval.add(sval1); aval.add(sval2); } @@ -182,11 +182,11 @@ DocumentSelectParserTest::createDocs() ArrayFieldValue abval(_doc.back()->getField("structarray").getDataType()); { StructFieldValue sval1(aval.getNestedType()); - sval1.set("key", 17); - sval1.set("value", "structval3"); + sval1.setValue("key", std::make_unique<IntFieldValue>(17)); + sval1.setValue("value", std::make_unique<StringFieldValue>("structval3")); StructFieldValue sval2(aval.getNestedType()); - sval2.set("key", 18); - sval2.set("value", "structval4"); + sval2.setValue("key", std::make_unique<IntFieldValue>(18)); + sval2.setValue("value", std::make_unique<StringFieldValue>("structval4")); abval.add(sval1); abval.add(sval2); } |