aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'searchlib/src/tests')
-rw-r--r--searchlib/src/tests/attribute/attribute_test.cpp8
-rw-r--r--searchlib/src/tests/attribute/enum_comparator/enum_comparator_test.cpp6
-rw-r--r--searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp2
-rw-r--r--searchlib/src/tests/attribute/posting_list_merger/posting_list_merger_test.cpp2
-rw-r--r--searchlib/src/tests/attribute/postinglist/postinglist.cpp24
-rw-r--r--searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp4
-rw-r--r--searchlib/src/tests/attribute/stringattribute/stringattribute_test.cpp2
-rw-r--r--searchlib/src/tests/memoryindex/compact_words_store/compact_words_store_test.cpp2
-rw-r--r--searchlib/src/tests/memoryindex/datastore/feature_store_test.cpp4
-rw-r--r--searchlib/src/tests/memoryindex/datastore/word_store_test.cpp2
-rw-r--r--searchlib/src/tests/memoryindex/field_index/field_index_test.cpp4
-rw-r--r--searchlib/src/tests/memoryindex/field_index_remover/field_index_remover_test.cpp6
-rw-r--r--searchlib/src/tests/predicate/predicate_bounds_posting_list_test.cpp2
-rw-r--r--searchlib/src/tests/predicate/predicate_index_test.cpp2
-rw-r--r--searchlib/src/tests/predicate/predicate_interval_posting_list_test.cpp2
-rw-r--r--searchlib/src/tests/predicate/predicate_zstar_compressed_posting_list_test.cpp2
-rw-r--r--searchlib/src/tests/predicate/simple_index_test.cpp10
17 files changed, 42 insertions, 42 deletions
diff --git a/searchlib/src/tests/attribute/attribute_test.cpp b/searchlib/src/tests/attribute/attribute_test.cpp
index 4715292f86a..b4267f45d6b 100644
--- a/searchlib/src/tests/attribute/attribute_test.cpp
+++ b/searchlib/src/tests/attribute/attribute_test.cpp
@@ -1640,7 +1640,7 @@ AttributeTest::testStatus()
// No posting list
static constexpr size_t LeafNodeSize = 4 + sizeof(IEnumStore::Index) * EnumTreeTraits::LEAF_SLOTS;
static constexpr size_t InternalNodeSize =
- 8 + (sizeof(IEnumStore::Index) + sizeof(datastore::EntryRef)) * EnumTreeTraits::INTERNAL_SLOTS;
+ 8 + (sizeof(IEnumStore::Index) + sizeof(vespalib::datastore::EntryRef)) * EnumTreeTraits::INTERNAL_SLOTS;
static constexpr size_t NestedVectorSize = 24; // sizeof(vespalib::Array)
{
@@ -1659,7 +1659,7 @@ AttributeTest::testStatus()
expUsed += 1 * InternalNodeSize + 1 * LeafNodeSize; // enum store tree
expUsed += 1 * 32; // enum store (uniquevalues * bytes per entry)
// multi value mapping (numdocs * sizeof(MappingIndex) + numvalues * sizeof(EnumIndex))
- expUsed += 100 * sizeof(datastore::EntryRef) + 100 * 4;
+ expUsed += 100 * sizeof(vespalib::datastore::EntryRef) + 100 * 4;
EXPECT_GREATER_EQUAL(ptr->getStatus().getUsed(), expUsed);
EXPECT_GREATER_EQUAL(ptr->getStatus().getAllocated(), expUsed);
}
@@ -1683,7 +1683,7 @@ AttributeTest::testStatus()
expUsed += numUniq * 32; // enum store (16 unique values, 32 bytes per entry)
// multi value mapping (numdocs * sizeof(MappingIndex) + numvalues * sizeof(EnumIndex) +
// numdocs * sizeof(Array<EnumIndex>) (due to vector vector))
- expUsed += numDocs * sizeof(datastore::EntryRef) + numDocs * numValuesPerDoc * sizeof(IEnumStore::Index) + ((numValuesPerDoc > 1024) ? numDocs * NestedVectorSize : 0);
+ expUsed += numDocs * sizeof(vespalib::datastore::EntryRef) + numDocs * numValuesPerDoc * sizeof(IEnumStore::Index) + ((numValuesPerDoc > 1024) ? numDocs * NestedVectorSize : 0);
EXPECT_GREATER_EQUAL(ptr->getStatus().getUsed(), expUsed);
EXPECT_GREATER_EQUAL(ptr->getStatus().getAllocated(), expUsed);
}
@@ -2059,7 +2059,7 @@ get_default_value_ref_count(AttributeVector &attr)
auto &enum_store = dynamic_cast<EnumStoreT<int32_t> &>(*enum_store_base);
IAttributeVector::EnumHandle default_value_handle(0);
if (enum_store.find_enum(attr.getDefaultValue(), default_value_handle)) {
- datastore::EntryRef default_value_ref(default_value_handle);
+ vespalib::datastore::EntryRef default_value_ref(default_value_handle);
assert(default_value_ref.valid());
return enum_store.get_ref_count(default_value_ref);
} else {
diff --git a/searchlib/src/tests/attribute/enum_comparator/enum_comparator_test.cpp b/searchlib/src/tests/attribute/enum_comparator/enum_comparator_test.cpp
index f3082e858a3..4e1e1c6d792 100644
--- a/searchlib/src/tests/attribute/enum_comparator/enum_comparator_test.cpp
+++ b/searchlib/src/tests/attribute/enum_comparator/enum_comparator_test.cpp
@@ -9,7 +9,7 @@
#include <vespa/log/log.h>
LOG_SETUP("enum_comparator_test");
-using namespace search::btree;
+using namespace vespalib::btree;
namespace search {
@@ -20,8 +20,8 @@ using StringEnumStore = EnumStoreT<const char*>;
using EnumIndex = IEnumStore::Index;
using TreeType = BTreeRoot<EnumIndex, BTreeNoLeafData,
- btree::NoAggregated,
- const datastore::EntryComparatorWrapper>;
+ vespalib::btree::NoAggregated,
+ const vespalib::datastore::EntryComparatorWrapper>;
using NodeAllocator = TreeType::NodeAllocatorType;
class Test : public vespalib::TestApp {
diff --git a/searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp b/searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp
index a936ba124ee..2bb55ac6977 100644
--- a/searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp
+++ b/searchlib/src/tests/attribute/multi_value_mapping/multi_value_mapping_test.cpp
@@ -12,7 +12,7 @@
#include <vespa/log/log.h>
LOG_SETUP("multivaluemapping_test");
-using search::datastore::ArrayStoreConfig;
+using vespalib::datastore::ArrayStoreConfig;
template <typename EntryT>
void
diff --git a/searchlib/src/tests/attribute/posting_list_merger/posting_list_merger_test.cpp b/searchlib/src/tests/attribute/posting_list_merger/posting_list_merger_test.cpp
index 6ee3eeaccba..99b22e02e2e 100644
--- a/searchlib/src/tests/attribute/posting_list_merger/posting_list_merger_test.cpp
+++ b/searchlib/src/tests/attribute/posting_list_merger/posting_list_merger_test.cpp
@@ -5,7 +5,7 @@
#include <vespa/vespalib/test/insertion_operators.h>
#include <algorithm>
-using search::btree::BTreeNoLeafData;
+using vespalib::btree::BTreeNoLeafData;
using search::attribute::PostingListMerger;
struct Posting {
diff --git a/searchlib/src/tests/attribute/postinglist/postinglist.cpp b/searchlib/src/tests/attribute/postinglist/postinglist.cpp
index 37d76e4a9e8..751fa72c349 100644
--- a/searchlib/src/tests/attribute/postinglist/postinglist.cpp
+++ b/searchlib/src/tests/attribute/postinglist/postinglist.cpp
@@ -96,18 +96,18 @@ private:
std::vector<RandomValue> _randomValues;
public:
- typedef datastore::DataStore<int> IntKeyStore;
- typedef btree::BTreeKeyData<uint32_t, btree::BTreeNoLeafData>
+ typedef vespalib::datastore::DataStore<int> IntKeyStore;
+ typedef vespalib::btree::BTreeKeyData<uint32_t, vespalib::btree::BTreeNoLeafData>
AttributePosting;
- typedef btree::BTreeStore<uint32_t,
- btree::BTreeNoLeafData,
- btree::NoAggregated,
+ typedef vespalib::btree::BTreeStore<uint32_t,
+ vespalib::btree::BTreeNoLeafData,
+ vespalib::btree::NoAggregated,
std::less<uint32_t>,
- btree::BTreeDefaultTraits>
+ vespalib::btree::BTreeDefaultTraits>
PostingList;
typedef PostingList::NodeAllocatorType PostingListNodeAllocator;
- typedef datastore::EntryRef PostingIdx;
- typedef datastore::EntryRef StoreIndex;
+ typedef vespalib::datastore::EntryRef PostingIdx;
+ typedef vespalib::datastore::EntryRef StoreIndex;
class IntComp {
private:
@@ -127,8 +127,8 @@ public:
}
};
- typedef btree::BTreeRoot<StoreIndex, PostingIdx,
- btree::NoAggregated,
+ typedef vespalib::btree::BTreeRoot<StoreIndex, PostingIdx,
+ vespalib::btree::NoAggregated,
const IntComp &> IntEnumTree;
typedef IntEnumTree::NodeAllocatorType IntEnumNodeAllocator;
typedef IntEnumTree Tree;
@@ -375,7 +375,7 @@ insertRandomValues(Tree &tree,
PostingIdx oldIdx = itr.getData();
PostingIdx newIdx = oldIdx;
AttributePosting newPosting(i->_docId,
- btree::BTreeNoLeafData());
+ vespalib::btree::BTreeNoLeafData());
std::vector<AttributePosting> additions;
std::vector<uint32_t> removals;
additions.push_back(newPosting);
@@ -591,7 +591,7 @@ AttributePostingListTest::doCompactEnumStore(Tree &tree,
std::vector<uint32_t> toHold;
for (uint32_t bufferId = 0; bufferId < numBuffers; ++bufferId) {
- datastore::BufferState &state = valueHandle.getBufferState(bufferId);
+ vespalib::datastore::BufferState &state = valueHandle.getBufferState(bufferId);
if (state.isActive()) {
toHold.push_back(bufferId);
// Freelists already disabled due to variable sized data
diff --git a/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp b/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp
index 0bb10bcdbe6..3e849ba6c4e 100644
--- a/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp
+++ b/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp
@@ -458,7 +458,7 @@ PostingListAttributeTest::checkPostingList(const VectorType & vec, const std::ve
ASSERT_TRUE(itr.valid());
typename VectorType::PostingList::Iterator postings;
- postings = postingList.begin(datastore::EntryRef(itr.getData()));
+ postings = postingList.begin(vespalib::datastore::EntryRef(itr.getData()));
uint32_t doc = docBegin;
uint32_t numHits(0);
@@ -677,7 +677,7 @@ PostingListAttributeTest::checkPostingList(AttributeType & vec, ValueType value,
ASSERT_TRUE(itr.valid());
typename AttributeType::PostingList::Iterator postings;
- postings = postingList.begin(datastore::EntryRef(itr.getData()));
+ postings = postingList.begin(vespalib::datastore::EntryRef(itr.getData()));
DocSet::iterator docBegin = expected.begin();
DocSet::iterator docEnd = expected.end();
diff --git a/searchlib/src/tests/attribute/stringattribute/stringattribute_test.cpp b/searchlib/src/tests/attribute/stringattribute/stringattribute_test.cpp
index a9c6cd1fd6c..a4b218e73e0 100644
--- a/searchlib/src/tests/attribute/stringattribute/stringattribute_test.cpp
+++ b/searchlib/src/tests/attribute/stringattribute/stringattribute_test.cpp
@@ -19,7 +19,7 @@ namespace search {
using attribute::CollectionType;
using attribute::IAttributeVector;
-using datastore::EntryRef;
+using vespalib::datastore::EntryRef;
class StringAttributeTest : public vespalib::TestApp
{
diff --git a/searchlib/src/tests/memoryindex/compact_words_store/compact_words_store_test.cpp b/searchlib/src/tests/memoryindex/compact_words_store/compact_words_store_test.cpp
index 52c85a70160..6f2e52f7a4f 100644
--- a/searchlib/src/tests/memoryindex/compact_words_store/compact_words_store_test.cpp
+++ b/searchlib/src/tests/memoryindex/compact_words_store/compact_words_store_test.cpp
@@ -9,7 +9,7 @@
#include <map>
using namespace search;
-using namespace search::datastore;
+using namespace vespalib::datastore;
using namespace search::memoryindex;
using vespalib::MemoryUsage;
diff --git a/searchlib/src/tests/memoryindex/datastore/feature_store_test.cpp b/searchlib/src/tests/memoryindex/datastore/feature_store_test.cpp
index c6368bee6eb..1eb9890cf2e 100644
--- a/searchlib/src/tests/memoryindex/datastore/feature_store_test.cpp
+++ b/searchlib/src/tests/memoryindex/datastore/feature_store_test.cpp
@@ -6,8 +6,8 @@
#include <vespa/log/log.h>
LOG_SETUP("feature_store_test");
-using namespace search::btree;
-using namespace search::datastore;
+using namespace vespalib::btree;
+using namespace vespalib::datastore;
using namespace search::index;
using search::index::schema::CollectionType;
diff --git a/searchlib/src/tests/memoryindex/datastore/word_store_test.cpp b/searchlib/src/tests/memoryindex/datastore/word_store_test.cpp
index 86365287b29..9ab5cc685e2 100644
--- a/searchlib/src/tests/memoryindex/datastore/word_store_test.cpp
+++ b/searchlib/src/tests/memoryindex/datastore/word_store_test.cpp
@@ -5,7 +5,7 @@
#include <vespa/log/log.h>
LOG_SETUP("word_store_test");
-using namespace search::datastore;
+using namespace vespalib::datastore;
namespace search::memoryindex {
diff --git a/searchlib/src/tests/memoryindex/field_index/field_index_test.cpp b/searchlib/src/tests/memoryindex/field_index/field_index_test.cpp
index 9347e99f6c2..ee42d68a495 100644
--- a/searchlib/src/tests/memoryindex/field_index/field_index_test.cpp
+++ b/searchlib/src/tests/memoryindex/field_index/field_index_test.cpp
@@ -25,8 +25,8 @@
#include <vespa/log/log.h>
LOG_SETUP("field_index_test");
-using namespace search::btree;
-using namespace search::datastore;
+using namespace vespalib::btree;
+using namespace vespalib::datastore;
namespace search {
diff --git a/searchlib/src/tests/memoryindex/field_index_remover/field_index_remover_test.cpp b/searchlib/src/tests/memoryindex/field_index_remover/field_index_remover_test.cpp
index f11df42f6b1..af7ea9be481 100644
--- a/searchlib/src/tests/memoryindex/field_index_remover/field_index_remover_test.cpp
+++ b/searchlib/src/tests/memoryindex/field_index_remover/field_index_remover_test.cpp
@@ -60,7 +60,7 @@ struct MockRemoveListener : public IFieldIndexRemoveListener {
struct FieldIndexRemoverTest : public ::testing::Test {
MockRemoveListener _listener;
std::vector<std::unique_ptr<WordStore>> _wordStores;
- std::vector<std::map<vespalib::string, datastore::EntryRef>> _wordToRefMaps;
+ std::vector<std::map<vespalib::string, vespalib::datastore::EntryRef>> _wordToRefMaps;
std::vector<std::unique_ptr<FieldIndexRemover>> _removers;
FieldIndexRemoverTest()
@@ -77,12 +77,12 @@ struct FieldIndexRemoverTest : public ::testing::Test {
}
_wordToRefMaps.resize(numFields);
}
- datastore::EntryRef getWordRef(const vespalib::string &word, uint32_t fieldId) {
+ vespalib::datastore::EntryRef getWordRef(const vespalib::string &word, uint32_t fieldId) {
auto &wordToRefMap = _wordToRefMaps[fieldId];
WordStore &wordStore = *_wordStores[fieldId];
auto itr = wordToRefMap.find(word);
if (itr == wordToRefMap.end()) {
- datastore::EntryRef ref = wordStore.addWord(word);
+ vespalib::datastore::EntryRef ref = wordStore.addWord(word);
wordToRefMap[word] = ref;
return ref;
}
diff --git a/searchlib/src/tests/predicate/predicate_bounds_posting_list_test.cpp b/searchlib/src/tests/predicate/predicate_bounds_posting_list_test.cpp
index 7c77dc1883c..915b5404e95 100644
--- a/searchlib/src/tests/predicate/predicate_bounds_posting_list_test.cpp
+++ b/searchlib/src/tests/predicate/predicate_bounds_posting_list_test.cpp
@@ -29,7 +29,7 @@ const uint64_t hash = 0x123;
TEST("require that empty bounds posting list starts at 0.") {
PredicateIndex index(generation_handler, generation_holder, limit_provider, config, 8);
- datastore::EntryRef ref;
+ vespalib::datastore::EntryRef ref;
PredicateBoundsPostingList<PredicateIndex::BTreeIterator>
posting_list(index.getIntervalStore(),
index.getBoundsIndex().getBTreePostingList(ref), 42);
diff --git a/searchlib/src/tests/predicate/predicate_index_test.cpp b/searchlib/src/tests/predicate/predicate_index_test.cpp
index 12bc192079a..199670d929f 100644
--- a/searchlib/src/tests/predicate/predicate_index_test.cpp
+++ b/searchlib/src/tests/predicate/predicate_index_test.cpp
@@ -239,7 +239,7 @@ void checkAllIntervals(Iterator posting_it, IntervalT expected_interval,
for (uint32_t id = 1; id < 100u; ++id) {
ASSERT_TRUE(posting_it.valid());
EXPECT_EQUAL(id, posting_it.getKey());
- datastore::EntryRef ref = posting_it.getData();
+ vespalib::datastore::EntryRef ref = posting_it.getData();
ASSERT_TRUE(ref.valid());
uint32_t size;
IntervalT single;
diff --git a/searchlib/src/tests/predicate/predicate_interval_posting_list_test.cpp b/searchlib/src/tests/predicate/predicate_interval_posting_list_test.cpp
index d91d50bdc8f..e27b01975f0 100644
--- a/searchlib/src/tests/predicate/predicate_interval_posting_list_test.cpp
+++ b/searchlib/src/tests/predicate/predicate_interval_posting_list_test.cpp
@@ -28,7 +28,7 @@ const uint64_t hash = 0x123;
TEST("require that empty posting list starts at 0.") {
PredicateIndex index(generation_handler, generation_holder, limit_provider, config, 8);
- datastore::EntryRef ref;
+ vespalib::datastore::EntryRef ref;
PredicateIntervalPostingList<PredicateIndex::BTreeIterator>
posting_list(index.getIntervalStore(), index.getIntervalIndex().getBTreePostingList(ref));
EXPECT_EQUAL(0u, posting_list.getDocId());
diff --git a/searchlib/src/tests/predicate/predicate_zstar_compressed_posting_list_test.cpp b/searchlib/src/tests/predicate/predicate_zstar_compressed_posting_list_test.cpp
index 2e5001a1adb..737be77a61e 100644
--- a/searchlib/src/tests/predicate/predicate_zstar_compressed_posting_list_test.cpp
+++ b/searchlib/src/tests/predicate/predicate_zstar_compressed_posting_list_test.cpp
@@ -29,7 +29,7 @@ const uint64_t hash = 0x123;
TEST("require that empty posting list starts at 0.") {
PredicateIndex index(generation_handler, generation_holder, limit_provider, config, 8);
- datastore::EntryRef ref;
+ vespalib::datastore::EntryRef ref;
PredicateZstarCompressedPostingList<PredicateIndex::BTreeIterator>
posting_list(index.getIntervalStore(), index.getIntervalIndex().getBTreePostingList(ref));
EXPECT_EQUAL(0u, posting_list.getDocId());
diff --git a/searchlib/src/tests/predicate/simple_index_test.cpp b/searchlib/src/tests/predicate/simple_index_test.cpp
index 84495dbdbe2..c5177c526c0 100644
--- a/searchlib/src/tests/predicate/simple_index_test.cpp
+++ b/searchlib/src/tests/predicate/simple_index_test.cpp
@@ -98,7 +98,7 @@ struct Fixture {
SimpleIndex<MyData>::VectorIterator getVectorPostingList(uint64_t k) {
return *_index.getVectorPostingList(k);
}
- SimpleIndex<MyData>::BTreeIterator getBTreePostingList(datastore::EntryRef ref) {
+ SimpleIndex<MyData>::BTreeIterator getBTreePostingList(vespalib::datastore::EntryRef ref) {
return _index.getBTreePostingList(ref);
}
void commit() {
@@ -112,7 +112,7 @@ TEST_F("require that SimpleIndex can insert and remove a value.", Fixture) {
f.commit();
auto it = f.lookup(key);
ASSERT_TRUE(it.valid());
- datastore::EntryRef ref = it.getData();
+ vespalib::datastore::EntryRef ref = it.getData();
auto posting_it = f.getBTreePostingList(ref);
ASSERT_TRUE(posting_it.valid());
EXPECT_EQUAL(doc_id, posting_it.getKey());
@@ -137,7 +137,7 @@ TEST_F("require that SimpleIndex can insert and remove many values.", Fixture) {
f.commit();
auto it = f.lookup(key);
ASSERT_TRUE(it.valid());
- datastore::EntryRef ref = it.getData();
+ vespalib::datastore::EntryRef ref = it.getData();
auto posting_it = f.getBTreePostingList(ref);
for (size_t id = 1; id < 100; ++id) {
ASSERT_TRUE(posting_it.valid());
@@ -181,7 +181,7 @@ TEST_FF("require that SimpleIndex can be serialized and deserialized.", Fixture,
auto it = f2.lookup(key);
ASSERT_TRUE(it.valid());
- datastore::EntryRef ref = it.getData();
+ vespalib::datastore::EntryRef ref = it.getData();
auto posting_it = f1.getBTreePostingList(ref);
for (uint32_t id = 1; id < 100; ++id) {
ASSERT_TRUE(posting_it.valid());
@@ -202,7 +202,7 @@ TEST_F("require that SimpleIndex can update by inserting the same key twice.", F
auto it = f.lookup(key);
ASSERT_TRUE(it.valid());
- datastore::EntryRef ref = it.getData();
+ vespalib::datastore::EntryRef ref = it.getData();
auto posting_it = f.getBTreePostingList(ref);
ASSERT_TRUE(posting_it.valid());
EXPECT_EQUAL(doc_id, posting_it.getKey());