diff options
Diffstat (limited to 'searchlib/src/tests/queryeval/parallel_weak_and/parallel_weak_and_test.cpp')
-rw-r--r-- | searchlib/src/tests/queryeval/parallel_weak_and/parallel_weak_and_test.cpp | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/searchlib/src/tests/queryeval/parallel_weak_and/parallel_weak_and_test.cpp b/searchlib/src/tests/queryeval/parallel_weak_and/parallel_weak_and_test.cpp index 2339a88be5a..d82565a9ec7 100644 --- a/searchlib/src/tests/queryeval/parallel_weak_and/parallel_weak_and_test.cpp +++ b/searchlib/src/tests/queryeval/parallel_weak_and/parallel_weak_and_test.cpp @@ -87,12 +87,8 @@ struct WandTestSpec : public WandSpec MatchParams matchParams; WandTestSpec(uint32_t scoresToTrack, uint32_t scoresAdjustFrequency = 1, - score_t scoreThreshold = 0, double thresholdBoostFactor = 1) - : WandSpec(), - heap(scoresToTrack), - rootMatchData(), - matchParams(heap, scoreThreshold, thresholdBoostFactor, scoresAdjustFrequency) - {} + score_t scoreThreshold = 0, double thresholdBoostFactor = 1); + ~WandTestSpec(); SearchIterator *create() { MatchData::UP childrenMatchData = createMatchData(); MatchData *tmp = childrenMatchData.get(); @@ -104,6 +100,18 @@ struct WandTestSpec : public WandSpec } }; +template <typename HeapType> +WandTestSpec<HeapType>::WandTestSpec(uint32_t scoresToTrack, uint32_t scoresAdjustFrequency, + score_t scoreThreshold, double thresholdBoostFactor) + : WandSpec(), + heap(scoresToTrack), + rootMatchData(), + matchParams(heap, scoreThreshold, thresholdBoostFactor, scoresAdjustFrequency) +{} + +template <typename HeapType> +WandTestSpec<HeapType>::~WandTestSpec() {} + typedef WandTestSpec<TestHeap> WandSpecWithTestHeap; typedef WandTestSpec<SharedWeakAndPriorityQueue> WandSpecWithRealHeap; @@ -403,7 +411,8 @@ struct BlueprintFixtureBase { WandBlueprintSpec spec; FakeSearchable searchable; - BlueprintFixtureBase() : spec(), searchable() {} + BlueprintFixtureBase(); + ~BlueprintFixtureBase(); Blueprint::UP blueprint(const search::query::Node &term) { return spec.blueprint(searchable, "field", term); } @@ -418,6 +427,9 @@ struct BlueprintFixtureBase } }; +BlueprintFixtureBase::BlueprintFixtureBase() : spec(), searchable() {} +BlueprintFixtureBase::~BlueprintFixtureBase() {} + struct BlueprintHitsFixture : public BlueprintFixtureBase { FakeResult createResult(size_t hits) { |