// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include #include #include #include namespace storage::distributor { struct BucketDatabaseTest : public ::testing::TestWithParam> { void SetUp() override ; std::string doFindParents(const std::vector& ids, const document::BucketId& searchId); std::string doFindAll(const std::vector& ids, const document::BucketId& searchId); document::BucketId doCreate(const std::vector& ids, uint32_t minBits, const document::BucketId& wantedId); BucketDatabase& db() noexcept { return *GetParam(); } using UBoundFunc = std::function< document::BucketId(const BucketDatabase&, const document::BucketId&)>; void doTestUpperBound(const UBoundFunc& f); }; }