diff options
author | Geir Storli <geirst@yahooinc.com> | 2023-03-13 13:55:29 +0000 |
---|---|---|
committer | Geir Storli <geirst@yahooinc.com> | 2023-03-13 13:59:08 +0000 |
commit | 0c657642eff7d85c000464e9edba16ded4845e7d (patch) | |
tree | 3315f420e49dd85739089780388007ce1649672a /document/src/tests/documentselectparsertest.cpp | |
parent | a40183094fd45dbf320dd57f8d56a5a6fac7f247 (diff) |
Reduce creation of Document instances without DocumentTypeRepo.
Diffstat (limited to 'document/src/tests/documentselectparsertest.cpp')
-rw-r--r-- | document/src/tests/documentselectparsertest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/document/src/tests/documentselectparsertest.cpp b/document/src/tests/documentselectparsertest.cpp index 5e14a080f27..13ad2873bfa 100644 --- a/document/src/tests/documentselectparsertest.cpp +++ b/document/src/tests/documentselectparsertest.cpp @@ -120,7 +120,7 @@ Document::SP DocumentSelectParserTest::createDoc( uint64_t hlong) { const DocumentType* type = _repo->getDocumentType(doctype); - auto doc = std::make_shared<Document>(*type, DocumentId(id)); + auto doc = std::make_shared<Document>(*_repo, *type, DocumentId(id)); doc->setValue(doc->getField("headerval"), IntFieldValue(hint)); if (hlong != 0) { @@ -1662,7 +1662,7 @@ TEST_F(DocumentSelectParserTest, test_parse_utilities_handle_malformed_input) TEST_F(DocumentSelectParserTest, imported_field_references_are_treated_as_valid_field_with_missing_value) { const DocumentType* type = _repo->getDocumentType("with_imported"); ASSERT_TRUE(type != nullptr); - Document doc(*type, DocumentId("id::with_imported::foo")); + Document doc(*_repo, *type, DocumentId("id::with_imported::foo")); PARSE("with_imported.my_imported_field == null", doc, True); PARSE("with_imported.my_imported_field != null", doc, False); @@ -1674,7 +1674,7 @@ TEST_F(DocumentSelectParserTest, imported_field_references_are_treated_as_valid_ TEST_F(DocumentSelectParserTest, imported_field_references_only_support_for_simple_expressions) { const DocumentType* type = _repo->getDocumentType("with_imported"); ASSERT_TRUE(type != nullptr); - Document doc(*type, DocumentId("id::with_imported::foo")); + Document doc(*_repo, *type, DocumentId("id::with_imported::foo")); PARSE("with_imported.my_imported_field.foo", doc, Invalid); PARSE("with_imported.my_imported_field[0]", doc, Invalid); |