xapian-core
1.4.27
|
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) | |
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... | |
static void | gen_valueweightsource5_db (Xapian::WritableDatabase &db, const string &) |
DEFINE_TESTCASE (valueweightsource5, 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) | |
static void | gen_decvalwtsource3_db (Xapian::WritableDatabase &db, const string &) |
DEFINE_TESTCASE (decvalwtsource3, backend) | |
DEFINE_TESTCASE (decvalwtsource4, backend &&!multi) | |
static void | gen_decvalwtsource5_db (Xapian::WritableDatabase &db, const string &) |
DEFINE_TESTCASE (decvalwtsource5, writable) | |
Tests of valuestream functionality.
Definition in file api_valuestream.cc.
DEFINE_TESTCASE | ( | valuestream1 | , |
backend | |||
) |
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 56 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 91 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 | , |
valuestats | |||
) |
Check that valueweightsource handles last_docid of 0xffffffff.
The original implementation went into an infinite loop in this case.
Definition at line 163 of file api_valuestream.cc.
References Xapian::ValuePostingSource::at_end(), contains(), gen_valueweightsource5_db(), get_database(), get_dbtype(), Xapian::ValuePostingSource::get_docid(), Xapian::ValueWeightPostingSource::init(), Xapian::ValuePostingSource::next(), SKIP_TEST, SKIP_TEST_FOR_BACKEND, TEST, TEST_EQUAL, and XFAIL_FOR_BACKEND().
DEFINE_TESTCASE | ( | valuemapsource1 | , |
backend | |||
) |
Definition at line 207 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 243 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 273 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 298 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 407 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 | , |
backend | |||
) |
Definition at line 553 of file api_valuestream.cc.
References gen_decvalwtsource3_db(), get_database(), Xapian::Enquire::get_mset(), mset_range_is_same(), Xapian::Enquire::set_query(), TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | decvalwtsource4 | , |
backend &&! | multi | ||
) |
Definition at line 580 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 615 of file api_valuestream.cc.
References gen_decvalwtsource5_db(), get_database(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), and TEST_EQUAL.
|
static |
Definition at line 537 of file api_valuestream.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_term(), Xapian::Document::add_value(), and Xapian::sortable_serialise().
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 604 of file api_valuestream.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_value(), and Xapian::sortable_serialise().
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 151 of file api_valuestream.cc.
References Xapian::Document::add_value(), Xapian::WritableDatabase::replace_document(), and Xapian::sortable_serialise().
Referenced by DEFINE_TESTCASE().