summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-10-03 23:56:30 +0200
committerGitHub <noreply@github.com>2020-10-03 23:56:30 +0200
commit3b3896aac6b7ea6b5bace26c39647e2ec960fcf7 (patch)
tree84f06ed9f5318214f37f4adc5c48a3bd2140bc27 /searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp
parentac901be72bd373a6e49f8a8149fd5c71e7eaae39 (diff)
parente278469ad6d752da7e33228d0a78a6f02b29ffbb (diff)
Merge pull request #14699 from vespa-engine/balder/fix-tests
Use correct serial number when creating attribute.
Diffstat (limited to 'searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp')
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp9
1 files changed, 4 insertions, 5 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() {