diff options
author | Geir Storli <geirst@yahooinc.com> | 2022-12-21 10:33:01 +0000 |
---|---|---|
committer | Geir Storli <geirst@yahooinc.com> | 2022-12-21 10:59:44 +0000 |
commit | 111e8f006cb92b08f6894c716b6e8d5dd9e94c0c (patch) | |
tree | 3d596543b2dab4e77feace6098ddf6bc1e127dc8 /searchcore/src/tests | |
parent | bc97f528bf6ca32750cadb84901beee144c03e41 (diff) |
Change from typedef to using in searchcore.
Diffstat (limited to 'searchcore/src/tests')
32 files changed, 96 insertions, 96 deletions
diff --git a/searchcore/src/tests/grouping/grouping.cpp b/searchcore/src/tests/grouping/grouping.cpp index a08d4703814..f71912b7100 100644 --- a/searchcore/src/tests/grouping/grouping.cpp +++ b/searchcore/src/tests/grouping/grouping.cpp @@ -83,7 +83,7 @@ struct MyWorld { //----------------------------------------------------------------------------- -typedef GroupingContext::GroupingList GroupingList; +using GroupingList = GroupingContext::GroupingList; SessionId createSessionId(const std::string & s) { std::vector<char> vec; diff --git a/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp b/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp index 8f409b3e31e..07167a91498 100644 --- a/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp +++ b/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp @@ -72,9 +72,9 @@ using vespa::config::search::AttributesConfig; using vespa::config::search::AttributesConfigBuilder; using vespalib::eval::ValueType; -typedef search::attribute::Config AVConfig; -typedef proton::AttributeCollectionSpec::AttributeList AttrSpecList; -typedef proton::AttributeCollectionSpec AttrMgrSpec; +using AVConfig = search::attribute::Config; +using AttrSpecList = proton::AttributeCollectionSpec::AttributeList; +using AttrMgrSpec = proton::AttributeCollectionSpec; namespace { diff --git a/searchcore/src/tests/proton/attribute/attributeflush_test.cpp b/searchcore/src/tests/proton/attribute/attributeflush_test.cpp index 7249476a907..b94df75c7be 100644 --- a/searchcore/src/tests/proton/attribute/attributeflush_test.cpp +++ b/searchcore/src/tests/proton/attribute/attributeflush_test.cpp @@ -33,15 +33,15 @@ using namespace vespalib; using search::index::DummyFileHeaderContext; -typedef search::attribute::Config AVConfig; -typedef search::attribute::BasicType AVBasicType; -typedef search::attribute::CollectionType AVCollectionType; +using AVConfig = search::attribute::Config; +using AVBasicType = search::attribute::BasicType; +using AVCollectionType = search::attribute::CollectionType; using searchcorespi::IFlushTarget; using searchcorespi::FlushStats; using std::chrono::duration_cast; using namespace std::literals; -typedef std::shared_ptr<Gate> GateSP; +using GateSP = std::shared_ptr<Gate>; namespace proton { diff --git a/searchcore/src/tests/proton/attribute/attributes_state_explorer/attributes_state_explorer_test.cpp b/searchcore/src/tests/proton/attribute/attributes_state_explorer/attributes_state_explorer_test.cpp index a7d41b6234c..bcd200cfd2f 100644 --- a/searchcore/src/tests/proton/attribute/attributes_state_explorer/attributes_state_explorer_test.cpp +++ b/searchcore/src/tests/proton/attribute/attributes_state_explorer/attributes_state_explorer_test.cpp @@ -86,7 +86,7 @@ struct AttributesStateExplorerTest : public ::testing::Test }; -typedef std::vector<vespalib::string> StringVector; +using StringVector = std::vector<vespalib::string>; TEST_F(AttributesStateExplorerTest, require_that_attributes_are_exposed_as_children_names) { 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 e831e8b2ac7..77135501b55 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 @@ -18,8 +18,8 @@ using namespace proton; using namespace search; using search::test::DocBuilder; -typedef search::attribute::Config AVConfig; -typedef search::attribute::BasicType AVBasicType; +using AVConfig = search::attribute::Config; +using AVBasicType = search::attribute::BasicType; struct DocContext { diff --git a/searchcore/src/tests/proton/bucketdb/bucketdb/bucketdb_test.cpp b/searchcore/src/tests/proton/bucketdb/bucketdb/bucketdb_test.cpp index 6d14c8b81df..4931fd86914 100644 --- a/searchcore/src/tests/proton/bucketdb/bucketdb/bucketdb_test.cpp +++ b/searchcore/src/tests/proton/bucketdb/bucketdb/bucketdb_test.cpp @@ -29,8 +29,8 @@ const Timestamp TIME_3(3u); constexpr uint32_t DOCSIZE_1(4096u); constexpr uint32_t DOCSIZE_2(10000u); -typedef BucketInfo::ReadyState RS; -typedef SubDbType SDT; +using RS = BucketInfo::ReadyState; +using SDT = SubDbType; namespace { diff --git a/searchcore/src/tests/proton/common/attribute_updater/attribute_updater_test.cpp b/searchcore/src/tests/proton/common/attribute_updater/attribute_updater_test.cpp index e367df3abbd..8c90b189b69 100644 --- a/searchcore/src/tests/proton/common/attribute_updater/attribute_updater_test.cpp +++ b/searchcore/src/tests/proton/common/attribute_updater/attribute_updater_test.cpp @@ -60,10 +60,10 @@ using vespalib::eval::ValueType; namespace search { -typedef AttributeVector::SP AttributePtr; -typedef AttributeVector::WeightedInt WeightedInt; -typedef AttributeVector::WeightedFloat WeightedFloat; -typedef AttributeVector::WeightedString WeightedString; +using AttributePtr = AttributeVector::SP; +using WeightedInt = AttributeVector::WeightedInt; +using WeightedFloat = AttributeVector::WeightedFloat; +using WeightedString = AttributeVector::WeightedString; std::unique_ptr<DocumentTypeRepo> makeDocumentTypeRepo() diff --git a/searchcore/src/tests/proton/common/cachedselect_test.cpp b/searchcore/src/tests/proton/common/cachedselect_test.cpp index 64c95c36350..6565ec601e6 100644 --- a/searchcore/src/tests/proton/common/cachedselect_test.cpp +++ b/searchcore/src/tests/proton/common/cachedselect_test.cpp @@ -70,7 +70,7 @@ using SessionUP = std::unique_ptr<CachedSelect::Session>; extern template class SingleValueNumericPostingAttribute<IntPostingAttribute>; #endif -typedef SingleValueNumericPostingAttribute<IntEnumAttribute> SvIntAttr; +using SvIntAttr = SingleValueNumericPostingAttribute<IntEnumAttribute>; namespace { @@ -232,12 +232,12 @@ public: class MyDB { public: - typedef std::unique_ptr<MyDB> UP; + using UP = std::unique_ptr<MyDB>; const DocumentTypeRepo &_repo; MyAttributeManager &_amgr; - typedef std::map<string, uint32_t> DocIdToLid; - typedef std::map<uint32_t, Document::SP> LidToDocSP; + using DocIdToLid = std::map<string, uint32_t>; + using LidToDocSP = std::map<uint32_t, Document::SP>; DocIdToLid _docIdToLid; LidToDocSP _lidToDocSP; diff --git a/searchcore/src/tests/proton/common/selectpruner_test.cpp b/searchcore/src/tests/proton/common/selectpruner_test.cpp index 3cb8389a4ea..4bc7ef53d94 100644 --- a/searchcore/src/tests/proton/common/selectpruner_test.cpp +++ b/searchcore/src/tests/proton/common/selectpruner_test.cpp @@ -35,7 +35,7 @@ using search::attribute::CollectionType; using search::attribute::test::MockAttributeManager; using search::AttributeFactory; -typedef Node::UP NodeUP; +using NodeUP = Node::UP; namespace { diff --git a/searchcore/src/tests/proton/docsummary/docsummary_test.cpp b/searchcore/src/tests/proton/docsummary/docsummary_test.cpp index 9bd3d6dbec5..fbe9de4e767 100644 --- a/searchcore/src/tests/proton/docsummary/docsummary_test.cpp +++ b/searchcore/src/tests/proton/docsummary/docsummary_test.cpp @@ -284,7 +284,7 @@ public: put(const document::Document &doc, const search::DocumentIdT lid) { const document::DocumentId &docId = doc.getId(); - typedef DocumentMetaStore::Result PutRes; + using PutRes = DocumentMetaStore::Result; IDocumentMetaStore &dms = _ddb->getReadySubDB()->getDocumentMetaStoreContext().get(); uint32_t docSize = 1; PutRes putRes(dms.put(docId.getGlobalId(), BucketFactory::getBucketId(docId), diff --git a/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp b/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp index a57787d417e..7af4378ff83 100644 --- a/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp +++ b/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp @@ -21,11 +21,11 @@ using search::SerialNum; using storage::spi::Timestamp; using namespace proton; -typedef std::vector<IFeedView::SP> FeedViewVector; +using FeedViewVector = std::vector<IFeedView::SP>; struct MyFeedView : public test::DummyFeedView { - typedef std::shared_ptr<MyFeedView> SP; + using SP = std::shared_ptr<MyFeedView>; DocumentMetaStore _metaStore; uint32_t _preparePut; uint32_t _handlePut; diff --git a/searchcore/src/tests/proton/documentdb/document_scan_iterator/document_scan_iterator_test.cpp b/searchcore/src/tests/proton/documentdb/document_scan_iterator/document_scan_iterator_test.cpp index 4825dc6e8a7..2e82b5b9c79 100644 --- a/searchcore/src/tests/proton/documentdb/document_scan_iterator/document_scan_iterator_test.cpp +++ b/searchcore/src/tests/proton/documentdb/document_scan_iterator/document_scan_iterator_test.cpp @@ -13,10 +13,10 @@ using namespace search; using vespalib::make_string; -typedef DocumentMetaStore::Result DMSResult; -typedef DocumentMetaStore::Timestamp Timestamp; -typedef std::set<uint32_t> LidSet; -typedef std::vector<uint32_t> LidVector; +using DMSResult = DocumentMetaStore::Result; +using Timestamp = DocumentMetaStore::Timestamp; +using LidSet = std::set<uint32_t>; +using LidVector = std::vector<uint32_t>; struct Fixture { diff --git a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp index 13cc4030262..ca03a49ea8d 100644 --- a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp +++ b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp @@ -75,12 +75,12 @@ using vespa::config::content::core::BucketspacesConfig; using vespalib::datastore::CompactionStrategy; using proton::index::IndexConfig; -typedef StoreOnlyDocSubDB::Config StoreOnlyConfig; -typedef StoreOnlyDocSubDB::Context StoreOnlyContext; -typedef FastAccessDocSubDB::Config FastAccessConfig; -typedef FastAccessDocSubDB::Context FastAccessContext; -typedef SearchableDocSubDB::Context SearchableContext; -typedef std::vector<AttributeGuard> AttributeGuardList; +using StoreOnlyConfig = StoreOnlyDocSubDB::Config; +using StoreOnlyContext = StoreOnlyDocSubDB::Context; +using FastAccessConfig = FastAccessDocSubDB::Config; +using FastAccessContext = FastAccessDocSubDB::Context; +using SearchableContext = SearchableDocSubDB::Context; +using AttributeGuardList = std::vector<AttributeGuard>; const std::string DOCTYPE_NAME = "searchdocument"; const std::string SUB_NAME = "subdb"; @@ -282,7 +282,7 @@ make_all_attr_schema(bool has_attr2) struct MyConfigSnapshot { - typedef std::unique_ptr<MyConfigSnapshot> UP; + using UP = std::unique_ptr<MyConfigSnapshot>; Schema _schema; DocBuilder _builder; DocumentDBConfig::SP _cfg; @@ -410,11 +410,11 @@ template <bool has_attr2_in, typename ConfigDirT, uint32_t ConfigSerial = CFG_SE struct BaseTraitsT { static constexpr bool has_attr2 = has_attr2_in; - typedef ConfigDirT ConfigDir; + using ConfigDir = ConfigDirT; static uint32_t configSerial() { return ConfigSerial; } }; -typedef BaseTraitsT<one_attr_schema, ConfigDir1> BaseTraits; +using BaseTraits = BaseTraitsT<one_attr_schema, ConfigDir1>; struct StoreOnlyTraits : public BaseTraits { @@ -424,7 +424,7 @@ struct StoreOnlyTraits : public BaseTraits using FeedView = StoreOnlyFeedView; }; -typedef FixtureBase<StoreOnlyTraits> StoreOnlyFixture; +using StoreOnlyFixture = FixtureBase<StoreOnlyTraits>; struct FastAccessTraits : public BaseTraits { @@ -434,7 +434,7 @@ struct FastAccessTraits : public BaseTraits using FeedView = FastAccessFeedView; }; -typedef FixtureBase<FastAccessTraits> FastAccessFixture; +using FastAccessFixture = FixtureBase<FastAccessTraits>; template <typename ConfigDirT> struct FastAccessOnlyTraitsBase : public BaseTraitsT<two_attr_schema, ConfigDirT> @@ -446,8 +446,8 @@ struct FastAccessOnlyTraitsBase : public BaseTraitsT<two_attr_schema, ConfigDirT }; // Setup with 1 fast-access attribute -typedef FastAccessOnlyTraitsBase<ConfigDir3> FastAccessOnlyTraits; -typedef FixtureBase<FastAccessOnlyTraits> FastAccessOnlyFixture; +using FastAccessOnlyTraits = FastAccessOnlyTraitsBase<ConfigDir3>; +using FastAccessOnlyFixture = FixtureBase<FastAccessOnlyTraits>; template <bool has_attr2_in, typename ConfigDirT> struct SearchableTraitsBase : public BaseTraitsT<has_attr2_in, ConfigDirT> @@ -458,8 +458,8 @@ struct SearchableTraitsBase : public BaseTraitsT<has_attr2_in, ConfigDirT> using FeedView = proton::SearchableFeedView; }; -typedef SearchableTraitsBase<one_attr_schema, ConfigDir1> SearchableTraits; -typedef FixtureBase<SearchableTraits> SearchableFixture; +using SearchableTraits = SearchableTraitsBase<one_attr_schema, ConfigDir1>; +using SearchableFixture = FixtureBase<SearchableTraits>; void assertAttributes1(const AttributeGuardList &attributes) @@ -711,8 +711,8 @@ getFlushTargets(Fixture &f) return targets; } -typedef IFlushTarget::Type FType; -typedef IFlushTarget::Component FComponent; +using FType = IFlushTarget::Type; +using FComponent = IFlushTarget::Component; bool assertTarget(const vespalib::string &name, @@ -927,8 +927,8 @@ TEST_F("require that fast-access attributes are populated during reprocessing", } // Setup with 2 fields (1 attribute according to config in dir) -typedef SearchableTraitsBase<two_attr_schema, ConfigDir1> SearchableTraitsTwoField; -typedef FixtureBase<SearchableTraitsTwoField> SearchableFixtureTwoField; +using SearchableTraitsTwoField = SearchableTraitsBase<two_attr_schema, ConfigDir1>; +using SearchableFixtureTwoField = FixtureBase<SearchableTraitsTwoField>; TEST_F("require that regular attributes are populated during reprocessing", SearchableFixtureTwoField) @@ -1009,10 +1009,10 @@ struct ExplorerFixture : public FixtureType } }; -typedef ExplorerFixture<StoreOnlyFixture> StoreOnlyExplorerFixture; -typedef ExplorerFixture<FastAccessFixture> FastAccessExplorerFixture; -typedef ExplorerFixture<SearchableFixture> SearchableExplorerFixture; -typedef std::vector<vespalib::string> StringVector; +using StoreOnlyExplorerFixture = ExplorerFixture<StoreOnlyFixture>; +using FastAccessExplorerFixture = ExplorerFixture<FastAccessFixture>; +using SearchableExplorerFixture = ExplorerFixture<SearchableFixture>; +using StringVector = std::vector<vespalib::string>; void assertExplorer(const StringVector &extraNames, const vespalib::StateExplorer &explorer) diff --git a/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp b/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp index 3a0ae8576ca..08d4c7d7773 100644 --- a/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp +++ b/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp @@ -15,7 +15,7 @@ using namespace vespa::config::search; using std::shared_ptr; using std::make_shared; -typedef shared_ptr<DocumentDBConfig> DDBCSP; +using DDBCSP = shared_ptr<DocumentDBConfig>; namespace { diff --git a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp index d31ae33dd15..2c396f8c946 100644 --- a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp +++ b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp @@ -75,7 +75,7 @@ using vespalib::eval::ValueType; using namespace proton; using namespace search::index; -typedef std::unique_ptr<vespalib::CountDownLatch> CountDownLatchUP; +using CountDownLatchUP = std::unique_ptr<vespalib::CountDownLatch>; namespace { @@ -83,7 +83,7 @@ struct Rendezvous { vespalib::Gate enter; vespalib::Gate leave; vespalib::Gate gone; - typedef std::unique_ptr<Rendezvous> UP; + using UP = std::unique_ptr<Rendezvous>; Rendezvous() : enter(), leave(), gone() {} bool run(vespalib::duration timeout = 80s) { enter.countDown(); diff --git a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp index b52078e98ec..fdfa7522350 100644 --- a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp +++ b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp @@ -62,8 +62,8 @@ using vespalib::eval::ValueType; using namespace proton; using namespace search::index; -typedef SearchableFeedView::SerialNum SerialNum; -typedef search::DocumentIdT DocumentIdT; +using SerialNum = SearchableFeedView::SerialNum; +using DocumentIdT = search::DocumentIdT; struct MyLidVector : public std::vector<DocumentIdT> { @@ -225,7 +225,7 @@ public: struct MyDocumentStore : public test::DummyDocumentStore { - typedef std::map<DocumentIdT, document::Document::SP> DocMap; + using DocMap = std::map<DocumentIdT, document::Document::SP>; const document::DocumentTypeRepo & _repo; DocMap _docs; uint64_t _lastSyncToken; @@ -462,7 +462,7 @@ struct DocumentContext DocumentUpdate::SP upd; BucketId bid; Timestamp ts; - typedef std::vector<DocumentContext> List; + using List = std::vector<DocumentContext>; DocumentContext(const vespalib::string &docId, uint64_t timestamp, DocBuilder &builder); ~DocumentContext(); void addFieldUpdate(DocBuilder &builder, const vespalib::string &fieldName) { @@ -488,8 +488,8 @@ struct FeedTokenContext { MyTransport mt; FeedToken ft; - typedef std::shared_ptr<FeedTokenContext> SP; - typedef std::vector<SP> List; + using SP = std::shared_ptr<FeedTokenContext>; + using List = std::vector<SP>; FeedTokenContext(MyTracer &tracer); ~FeedTokenContext(); }; diff --git a/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp b/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp index e1ec5916291..99915a1b50f 100644 --- a/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp +++ b/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp @@ -34,8 +34,8 @@ using proton::matching::RankingConstants; using proton::matching::RankingExpressions; using proton::matching::OnnxModels; -typedef DocumentDBConfigHelper DBCM; -typedef DocumentDBConfig::DocumenttypesConfigSP DocumenttypesConfigSP; +using DBCM = DocumentDBConfigHelper; +using DocumenttypesConfigSP = DocumentDBConfig::DocumenttypesConfigSP; using vespalib::nbostream; vespalib::string myId("myconfigid"); diff --git a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp index 95f03558231..0234d5fbedf 100644 --- a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp +++ b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp @@ -73,7 +73,7 @@ using storage::spi::dummy::DummyBucketExecutor; using BlockedReason = IBlockableMaintenanceJob::BlockedReason; -typedef BucketId::List BucketIdVector; +using BucketIdVector = BucketId::List; constexpr vespalib::duration TIMEOUT = 60s; @@ -92,7 +92,7 @@ sampleThreadId(FastOS_ThreadId *threadId) class MyDocumentSubDB { - typedef std::map<DocumentIdT, Document::SP> DocMap; + using DocMap = std::map<DocumentIdT, Document::SP>; DocMap _docs; uint32_t _subDBId; DocumentMetaStore::SP _metaStoreSP; @@ -441,7 +441,7 @@ void MyDocumentSubDB::handlePruneRemovedDocuments(const PruneRemovedDocumentsOperation &op) { assert(_subDBId == 1u); - typedef LidVectorContext::LidVector LidVector; + using LidVector = LidVectorContext::LidVector; const SerialNum serialNum = op.getSerialNum(); const LidVectorContext &lidCtx = *op.getLidsToRemove(); const LidVector &lidsToRemove(lidCtx.getLidVector()); @@ -464,7 +464,7 @@ MyDocumentSubDB::handlePut(PutOperation &op) bool needCommit = false; if (op.getValidDbdId(_subDBId)) { - typedef DocumentMetaStore::Result PutRes; + using PutRes = DocumentMetaStore::Result; PutRes putRes(_metaStore.put(gid, op.getBucketId(), @@ -506,7 +506,7 @@ MyDocumentSubDB::handleRemove(RemoveOperationWithDocId &op) bool needCommit = false; if (op.getValidDbdId(_subDBId)) { - typedef DocumentMetaStore::Result PutRes; + using PutRes = DocumentMetaStore::Result; PutRes putRes(_metaStore.put(gid, op.getBucketId(), @@ -564,7 +564,7 @@ MyDocumentSubDB::handleMove(const MoveOperation &op) bool needCommit = false; if (op.getValidDbdId(_subDBId)) { - typedef DocumentMetaStore::Result PutRes; + using PutRes = DocumentMetaStore::Result; PutRes putRes(_metaStore.put(gid, op.getBucketId(), diff --git a/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp b/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp index 04dfdb7f7ff..bb0eb89013c 100644 --- a/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp +++ b/searchcore/src/tests/proton/documentmetastore/documentmetastore_test.cpp @@ -640,8 +640,8 @@ void requireThatBasicBucketInfoWorks() { DocumentMetaStore dms(createBucketDB()); - typedef std::pair<BucketId, GlobalId> Elem; - typedef std::map<Elem, Timestamp> Map; + using Elem = std::pair<BucketId, GlobalId>; + using Map = std::map<Elem, Timestamp>; Map m; uint32_t numLids = 2000; dms.constructFreeList(); @@ -1068,7 +1068,7 @@ SplitAndJoinEmptyFixture::~SplitAndJoinEmptyFixture() struct SplitAndJoinFixture : public SplitAndJoinEmptyFixture { - typedef std::map<BucketId, GlobalIdVector> BucketMap; + using BucketMap = std::map<BucketId, GlobalIdVector>; GlobalIdVector gids; BucketMap bid1s; BucketMap bid2s; diff --git a/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp b/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp index 6c1821dc00e..87947788bdf 100644 --- a/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp +++ b/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp @@ -46,7 +46,7 @@ using namespace proton; namespace { struct MyStreamHandler : NewConfigOperation::IStreamHandler { - typedef NewConfigOperation::SerialNum SerialNum; + using SerialNum = NewConfigOperation::SerialNum; virtual void serializeConfig(SerialNum, vespalib::nbostream &) override {} virtual void deserializeConfig(SerialNum, vespalib::nbostream &) override {} }; diff --git a/searchcore/src/tests/proton/flushengine/flushengine_test.cpp b/searchcore/src/tests/proton/flushengine/flushengine_test.cpp index d795ed95550..a7efe2952eb 100644 --- a/searchcore/src/tests/proton/flushengine/flushengine_test.cpp +++ b/searchcore/src/tests/proton/flushengine/flushengine_test.cpp @@ -119,7 +119,7 @@ public: FlushDoneHistory _flushDoneHistory; public: - typedef std::shared_ptr<SimpleHandler> SP; + using SP = std::shared_ptr<SimpleHandler>; SimpleHandler(const Targets &targets, const std::string &name = "anon", search::SerialNum currentSerial = -1) @@ -298,7 +298,7 @@ public: mutable bool _serial; public: - typedef std::shared_ptr<AssertedTarget> SP; + using SP = std::shared_ptr<AssertedTarget>; AssertedTarget() : SimpleTarget("anon"), @@ -348,7 +348,7 @@ public: public: - typedef std::shared_ptr<SimpleStrategy> SP; + using SP = std::shared_ptr<SimpleStrategy>; SimpleStrategy() noexcept : _targets() {} diff --git a/searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp b/searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp index 7a135e46937..6ff63223231 100644 --- a/searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp +++ b/searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp @@ -32,7 +32,7 @@ toString(const std::vector<SerialNum> &vec) struct MyIndexManager : public proton::test::MockIndexManager { - typedef std::map<uint32_t, std::vector<SerialNum> > LidMap; + using LidMap = std::map<uint32_t, std::vector<SerialNum> >; LidMap puts; LidMap removes; SerialNum current; diff --git a/searchcore/src/tests/proton/matchengine/matchengine.cpp b/searchcore/src/tests/proton/matchengine/matchengine.cpp index 34c36fd9a72..514c9038945 100644 --- a/searchcore/src/tests/proton/matchengine/matchengine.cpp +++ b/searchcore/src/tests/proton/matchengine/matchengine.cpp @@ -116,7 +116,7 @@ TEST("requireThatCorrectHandlerIsUsed") } struct ObserveBundleMatchHandler : MySearchHandler { - typedef std::shared_ptr<ObserveBundleMatchHandler> SP; + using SP = std::shared_ptr<ObserveBundleMatchHandler>; mutable size_t bundleSize; ObserveBundleMatchHandler() : bundleSize(0) {} diff --git a/searchcore/src/tests/proton/matching/docid_range_scheduler/docid_range_scheduler_bench.cpp b/searchcore/src/tests/proton/matching/docid_range_scheduler/docid_range_scheduler_bench.cpp index c85ef7f3446..5efc85c233d 100644 --- a/searchcore/src/tests/proton/matching/docid_range_scheduler/docid_range_scheduler_bench.cpp +++ b/searchcore/src/tests/proton/matching/docid_range_scheduler/docid_range_scheduler_bench.cpp @@ -49,7 +49,7 @@ TEST("measure do_work overhead for different cost inputs") { //----------------------------------------------------------------------------- struct Work { - typedef std::unique_ptr<Work> UP; + using UP = std::unique_ptr<Work>; virtual vespalib::string desc() const = 0; virtual void perform(uint32_t docid) const = 0; virtual ~Work() {} @@ -102,7 +102,7 @@ struct WorkList { //----------------------------------------------------------------------------- struct SchedulerFactory { - typedef std::unique_ptr<SchedulerFactory> UP; + using UP = std::unique_ptr<SchedulerFactory>; virtual vespalib::string desc() const = 0; virtual DocidRangeScheduler::UP create(uint32_t docid_limit) const = 0; virtual ~SchedulerFactory() {} diff --git a/searchcore/src/tests/proton/matching/querynodes_test.cpp b/searchcore/src/tests/proton/matching/querynodes_test.cpp index 14014853cc9..c73483efed5 100644 --- a/searchcore/src/tests/proton/matching/querynodes_test.cpp +++ b/searchcore/src/tests/proton/matching/querynodes_test.cpp @@ -112,7 +112,7 @@ public: return SearchType::create(std::move(_children), _strict).release(); } }; -typedef Create<OrSearch> MyOr; +using MyOr = Create<OrSearch>; class ISourceSelectorDummy : public ISourceSelector { @@ -130,7 +130,7 @@ public: ISourceSelector::SourceStore ISourceSelectorDummy::_sourceStoreDummy("foo"); -typedef uint32_t SourceId; +using SourceId = uint32_t; class Blender { bool _strict; SourceBlenderSearch::Children _children; @@ -212,7 +212,7 @@ public: template <typename Tag> string getIteratorAsString(); }; -typedef QueryBuilder<ProtonNodeTypes> QB; +using QB = QueryBuilder<ProtonNodeTypes>; struct Phrase { void addToBuilder(QB& b) { b.addPhrase(2, view, id, weight); }}; struct SameElement { void addToBuilder(QB& b) { b.addSameElement(2, view); }}; struct Near { void addToBuilder(QB& b) { b.addNear(2, distance); } }; diff --git a/searchcore/src/tests/proton/metrics/documentdb_job_trackers/documentdb_job_trackers_test.cpp b/searchcore/src/tests/proton/metrics/documentdb_job_trackers/documentdb_job_trackers_test.cpp index e5aa17f10a9..8e1996be29e 100644 --- a/searchcore/src/tests/proton/metrics/documentdb_job_trackers/documentdb_job_trackers_test.cpp +++ b/searchcore/src/tests/proton/metrics/documentdb_job_trackers/documentdb_job_trackers_test.cpp @@ -14,8 +14,8 @@ using namespace searchcorespi; constexpr double EPS = 0.000001; -typedef IFlushTarget::Type FTT; -typedef IFlushTarget::Component FTC; +using FTT = IFlushTarget::Type; +using FTC = IFlushTarget::Component; struct MFT : public test::DummyFlushTarget { diff --git a/searchcore/src/tests/proton/metrics/job_tracked_flush/job_tracked_flush_test.cpp b/searchcore/src/tests/proton/metrics/job_tracked_flush/job_tracked_flush_test.cpp index 340108c3d69..5c966c6d327 100644 --- a/searchcore/src/tests/proton/metrics/job_tracked_flush/job_tracked_flush_test.cpp +++ b/searchcore/src/tests/proton/metrics/job_tracked_flush/job_tracked_flush_test.cpp @@ -35,7 +35,7 @@ struct MyFlushTask : public searchcorespi::FlushTask struct MyFlushTarget : public test::DummyFlushTarget { - typedef std::shared_ptr<MyFlushTarget> SP; + using SP = std::shared_ptr<MyFlushTarget>; SerialNum _initFlushSerial; Gate _execGate; Gate _initGate; diff --git a/searchcore/src/tests/proton/persistenceengine/persistenceengine_test.cpp b/searchcore/src/tests/proton/persistenceengine/persistenceengine_test.cpp index cf58056cae8..e9fd4fa9d37 100644 --- a/searchcore/src/tests/proton/persistenceengine/persistenceengine_test.cpp +++ b/searchcore/src/tests/proton/persistenceengine/persistenceengine_test.cpp @@ -82,8 +82,8 @@ createClusterState(const storage::lib::State& nodeState = storage::lib::State::U using storage::lib::NodeType; using storage::lib::State; using vespa::config::content::StorDistributionConfigBuilder; - typedef StorDistributionConfigBuilder::Group Group; - typedef Group::Nodes Nodes; + using Group = StorDistributionConfigBuilder::Group; + using Nodes = Group::Nodes; storage::lib::ClusterState cstate; StorDistributionConfigBuilder dc; diff --git a/searchcore/src/tests/proton/reprocessing/attribute_reprocessing_initializer/attribute_reprocessing_initializer_test.cpp b/searchcore/src/tests/proton/reprocessing/attribute_reprocessing_initializer/attribute_reprocessing_initializer_test.cpp index 46796738fa8..b7ca199f6dc 100644 --- a/searchcore/src/tests/proton/reprocessing/attribute_reprocessing_initializer/attribute_reprocessing_initializer_test.cpp +++ b/searchcore/src/tests/proton/reprocessing/attribute_reprocessing_initializer/attribute_reprocessing_initializer_test.cpp @@ -38,9 +38,9 @@ using vespalib::ForegroundThreadExecutor; const vespalib::string TEST_DIR = "test_output"; const SerialNum INIT_SERIAL_NUM = 10; -typedef std::vector<vespalib::string> StringVector; -typedef std::set<vespalib::string> StringSet; -typedef AttributeReprocessingInitializer::Config ARIConfig; +using StringVector = std::vector<vespalib::string>; +using StringSet = std::set<vespalib::string>; +using ARIConfig = AttributeReprocessingInitializer::Config; struct MyReprocessingHandler : public IReprocessingHandler { diff --git a/searchcore/src/tests/proton/reprocessing/document_reprocessing_handler/document_reprocessing_handler_test.cpp b/searchcore/src/tests/proton/reprocessing/document_reprocessing_handler/document_reprocessing_handler_test.cpp index 0755a172945..5c5e60547ec 100644 --- a/searchcore/src/tests/proton/reprocessing/document_reprocessing_handler/document_reprocessing_handler_test.cpp +++ b/searchcore/src/tests/proton/reprocessing/document_reprocessing_handler/document_reprocessing_handler_test.cpp @@ -13,7 +13,7 @@ using search::test::DocBuilder; template <typename ReprocessingType> struct MyProcessor : public ReprocessingType { - typedef std::shared_ptr<MyProcessor<ReprocessingType> > SP; + using SP = std::shared_ptr<MyProcessor<ReprocessingType> >; uint32_t _lid; DocumentId _docId; @@ -24,8 +24,8 @@ struct MyProcessor : public ReprocessingType } }; -typedef MyProcessor<IReprocessingReader> MyReader; -typedef MyProcessor<IReprocessingRewriter> MyRewriter; +using MyReader = MyProcessor<IReprocessingReader>; +using MyRewriter = MyProcessor<IReprocessingRewriter>; const vespalib::string DOC_ID = "id:test:searchdocument::0"; diff --git a/searchcore/src/tests/proton/reprocessing/reprocessing_runner/reprocessing_runner_test.cpp b/searchcore/src/tests/proton/reprocessing/reprocessing_runner/reprocessing_runner_test.cpp index 2a9d5d371b2..c3acc99a3b2 100644 --- a/searchcore/src/tests/proton/reprocessing/reprocessing_runner/reprocessing_runner_test.cpp +++ b/searchcore/src/tests/proton/reprocessing/reprocessing_runner/reprocessing_runner_test.cpp @@ -17,7 +17,7 @@ struct Fixture } }; -typedef ReprocessingRunner::ReprocessingTasks TaskList; +using TaskList = ReprocessingRunner::ReprocessingTasks; struct MyTask : public IReprocessingTask { diff --git a/searchcore/src/tests/proton/server/documentretriever_test.cpp b/searchcore/src/tests/proton/server/documentretriever_test.cpp index bf277f86367..6cc2ca22531 100644 --- a/searchcore/src/tests/proton/server/documentretriever_test.cpp +++ b/searchcore/src/tests/proton/server/documentretriever_test.cpp @@ -341,7 +341,7 @@ struct Fixture { _dtName(doc_type_name), _retriever() { - typedef DocumentMetaStore::Result Result; + using Result = DocumentMetaStore::Result; meta_store.constructFreeList(); Result inspect = meta_store.get().inspect(gid, 0u); uint32_t docSize = 1; |