xapian-core
1.4.22
|
Tests of valuestream functionality. More...
#include <config.h>
#include "api_valuestream.h"
#include <xapian.h>
#include "testsuite.h"
#include "testutils.h"
#include "apitest.h"
Go to the source code of this file.
Functions | |
DEFINE_TESTCASE (valuestream1, backend &&!multi) | |
Feature test simple valuestream iteration. More... | |
DEFINE_TESTCASE (valuestream2, backend) | |
Test skip_to() on a valuestream iterator. More... | |
DEFINE_TESTCASE (valuestream3, backend) | |
Test check() on a valuestream iterator. More... | |
DEFINE_TESTCASE (valueweightsource5, writable &&valuestats) | |
Check that valueweightsource handles last_docid of 0xffffffff. More... | |
DEFINE_TESTCASE (valuemapsource1, backend) | |
DEFINE_TESTCASE (valuemapsource2, backend &&!multi) | |
DEFINE_TESTCASE (fixedweightsource2, !backend) | |
DEFINE_TESTCASE (decvalwtsource1, writable) | |
DEFINE_TESTCASE (decvalwtsource2, writable) | |
DEFINE_TESTCASE (decvalwtsource3, writable) | |
DEFINE_TESTCASE (decvalwtsource4, backend &&!multi) | |
DEFINE_TESTCASE (decvalwtsource5, writable) | |
Tests of valuestream functionality.
Definition in file api_valuestream.cc.
DEFINE_TESTCASE | ( | valuestream1 | , |
backend &&! | multi | ||
) |
Feature test simple valuestream iteration.
Definition at line 36 of file api_valuestream.cc.
References get_database(), Xapian::ValueIterator::get_docid(), Xapian::Database::get_document(), Xapian::Document::get_value(), Xapian::ValueIterator::get_valueno(), TEST_EQUAL, tout, Xapian::Database::valuestream_begin(), and Xapian::Database::valuestream_end().
DEFINE_TESTCASE | ( | valuestream2 | , |
backend | |||
) |
Test skip_to() on a valuestream iterator.
Definition at line 57 of file api_valuestream.cc.
References get_database(), Xapian::ValueIterator::get_docid(), Xapian::Database::get_document(), Xapian::Document::get_value(), Xapian::ValueIterator::get_valueno(), Xapian::ValueIterator::skip_to(), TEST, TEST_EQUAL, TEST_REL, tout, Xapian::Database::valuestream_begin(), and Xapian::Database::valuestream_end().
DEFINE_TESTCASE | ( | valuestream3 | , |
backend | |||
) |
Test check() on a valuestream iterator.
Definition at line 92 of file api_valuestream.cc.
References Xapian::ValueIterator::check(), get_database(), Xapian::ValueIterator::get_docid(), Xapian::Database::get_document(), Xapian::Document::get_value(), Xapian::ValueIterator::get_valueno(), Xapian::ValueIterator::skip_to(), TEST, TEST_EQUAL, tout, Xapian::Database::valuestream_begin(), and Xapian::Database::valuestream_end().
DEFINE_TESTCASE | ( | valueweightsource5 | , |
writable && | valuestats | ||
) |
Check that valueweightsource handles last_docid of 0xffffffff.
The original implementation went into an infinite loop in this case.
Definition at line 155 of file api_valuestream.cc.
References Xapian::Document::add_value(), Xapian::ValuePostingSource::at_end(), Xapian::WritableDatabase::commit(), Xapian::ValuePostingSource::get_docid(), get_writable_database(), Xapian::ValueWeightPostingSource::init(), Xapian::ValuePostingSource::next(), Xapian::WritableDatabase::replace_document(), SKIP_TEST_FOR_BACKEND, Xapian::sortable_serialise(), TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | valuemapsource1 | , |
backend | |||
) |
Definition at line 201 of file api_valuestream.cc.
References Xapian::ValueMapPostingSource::add_mapping(), Xapian::ValueMapPostingSource::clear_mappings(), get_database(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::ValueMapPostingSource::set_default_weight(), Xapian::Enquire::set_query(), Xapian::MSet::size(), and TEST.
DEFINE_TESTCASE | ( | valuemapsource2 | , |
backend &&! | multi | ||
) |
Definition at line 237 of file api_valuestream.cc.
References Xapian::ValuePostingSource::at_end(), Xapian::ValuePostingSource::check(), get_database(), Xapian::ValueMapPostingSource::init(), Xapian::ValuePostingSource::next(), Xapian::ValuePostingSource::skip_to(), and TEST.
DEFINE_TESTCASE | ( | fixedweightsource2 | , |
! | backend | ||
) |
Definition at line 267 of file api_valuestream.cc.
References Xapian::FixedWeightPostingSource::at_end(), Xapian::FixedWeightPostingSource::init(), Xapian::FixedWeightPostingSource::next(), Xapian::FixedWeightPostingSource::skip_to(), and TEST.
DEFINE_TESTCASE | ( | decvalwtsource1 | , |
writable | |||
) |
Definition at line 292 of file api_valuestream.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_value(), Xapian::ValuePostingSource::at_end(), Xapian::DecreasingValueWeightPostingSource::check(), Xapian::WritableDatabase::commit(), Xapian::ValuePostingSource::get_docid(), get_writable_database(), Xapian::DecreasingValueWeightPostingSource::init(), Xapian::DecreasingValueWeightPostingSource::next(), Xapian::DecreasingValueWeightPostingSource::skip_to(), Xapian::sortable_serialise(), TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | decvalwtsource2 | , |
writable | |||
) |
Definition at line 401 of file api_valuestream.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_value(), Xapian::ValuePostingSource::at_end(), Xapian::DecreasingValueWeightPostingSource::check(), Xapian::WritableDatabase::commit(), Xapian::ValuePostingSource::get_docid(), get_writable_database(), Xapian::DecreasingValueWeightPostingSource::init(), Xapian::DecreasingValueWeightPostingSource::next(), Xapian::DecreasingValueWeightPostingSource::skip_to(), Xapian::sortable_serialise(), TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | decvalwtsource3 | , |
writable | |||
) |
Definition at line 531 of file api_valuestream.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_term(), Xapian::Document::add_value(), Xapian::WritableDatabase::commit(), Xapian::Enquire::get_mset(), get_writable_database(), mset_range_is_same(), Xapian::Enquire::set_query(), Xapian::sortable_serialise(), TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | decvalwtsource4 | , |
backend &&! | multi | ||
) |
Definition at line 569 of file api_valuestream.cc.
References get_database(), Xapian::Enquire::get_mset(), mset_range_is_same(), Xapian::Enquire::set_query(), TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | decvalwtsource5 | , |
writable | |||
) |
Definition at line 594 of file api_valuestream.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_value(), Xapian::WritableDatabase::commit(), Xapian::Enquire::get_mset(), get_writable_database(), Xapian::Enquire::set_query(), Xapian::sortable_serialise(), and TEST_EQUAL.