summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'searchcore/src/tests')
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp9
-rw-r--r--searchcore/src/tests/proton/attribute/document_field_populator/document_field_populator_test.cpp7
-rw-r--r--searchcore/src/tests/proton/docsummary/docsummary.cpp5
-rw-r--r--searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp2
4 files changed, 11 insertions, 12 deletions
diff --git a/searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp b/searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp
index f81644c3f55..683a6cd1197 100644
--- a/searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp
@@ -41,7 +41,7 @@ makeDocTypeRepo()
Struct("searchdocument.header"),
Struct("searchdocument.body").
addField("a1", DataType::T_INT));
- return std::unique_ptr<const DocumentTypeRepo>(new DocumentTypeRepo(builder.config()));
+ return std::make_unique<DocumentTypeRepo>(builder.config());
}
struct DocContext
@@ -76,13 +76,12 @@ struct Fixture
_attributeFieldWriter(),
_shared(),
_hwInfo(),
- _mgr(new AttributeManager(TEST_DIR, "test.subdb", TuneFileAttributes(),
- _fileHeader, _attributeFieldWriter, _shared, _hwInfo)),
+ _mgr(std::make_shared<AttributeManager>(TEST_DIR, "test.subdb", TuneFileAttributes(),
+ _fileHeader, _attributeFieldWriter, _shared, _hwInfo)),
_pop(),
_ctx()
{
- _mgr->addAttribute({ "a1", AVConfig(AVBasicType::INT32)},
- CREATE_SERIAL_NUM);
+ _mgr->addAttribute({ "a1", AVConfig(AVBasicType::INT32)}, CREATE_SERIAL_NUM);
_pop = std::make_unique<AttributePopulator>(_mgr, 1, "test", CREATE_SERIAL_NUM);
}
AttributeGuard::UP getAttr() {
diff --git a/searchcore/src/tests/proton/attribute/document_field_populator/document_field_populator_test.cpp b/searchcore/src/tests/proton/attribute/document_field_populator/document_field_populator_test.cpp
index a684f24f20d..4fd8b4208da 100644
--- a/searchcore/src/tests/proton/attribute/document_field_populator/document_field_populator_test.cpp
+++ b/searchcore/src/tests/proton/attribute/document_field_populator/document_field_populator_test.cpp
@@ -1,8 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("document_field_populator_test");
-#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchcommon/common/schema.h>
#include <vespa/searchcore/proton/attribute/document_field_populator.h>
#include <vespa/searchlib/attribute/attributefactory.h>
@@ -10,6 +8,9 @@ LOG_SETUP("document_field_populator_test");
#include <vespa/searchlib/index/docbuilder.h>
#include <vespa/vespalib/util/stringfmt.h>
+#include <vespa/log/log.h>
+LOG_SETUP("document_field_populator_test");
+
using namespace document;
using namespace proton;
using namespace search;
diff --git a/searchcore/src/tests/proton/docsummary/docsummary.cpp b/searchcore/src/tests/proton/docsummary/docsummary.cpp
index 7d5dbb8ca71..7e4e05f6948 100644
--- a/searchcore/src/tests/proton/docsummary/docsummary.cpp
+++ b/searchcore/src/tests/proton/docsummary/docsummary.cpp
@@ -1045,10 +1045,9 @@ TEST("requireThatPositionsAreUsed")
endDocument();
dc.put(*exp, 1);
- IDocumentStore & store =
- dc._ddb->getReadySubDB()->getSummaryManager()->getBackingStore();
+ IDocumentStore & store = dc._ddb->getReadySubDB()->getSummaryManager()->getBackingStore();
Document::UP act = store.read(1, *bc._repo);
- EXPECT_TRUE(act.get() != nullptr);
+ EXPECT_TRUE(act);
EXPECT_EQUAL(exp->getType(), act->getType());
DocsumRequest req;
diff --git a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
index a97345bcfbb..b275064c0f2 100644
--- a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
@@ -323,7 +323,7 @@ struct MyAttributeWriter : public IAttributeWriter
MyTracer &_tracer;
MyAttributeWriter(MyTracer &tracer);
- ~MyAttributeWriter();
+ ~MyAttributeWriter() override;
std::vector<AttributeVector *>
getWritableAttributes() const override {