|
xapian-core
2.0.0
|
tests of posting sources More...
#include <config.h>#include "api_postingsource.h"#include <xapian.h>#include <string>#include "safeunistd.h"#include "str.h"#include "testutils.h"#include "apitest.h"
Include dependency graph for api_postingsource.cc:Go to the source code of this file.
Classes | |
| class | MyOddPostingSource |
| class | MyOddWeightingPostingSource |
| class | MyDontAskWeightPostingSource |
| class | ChangeMaxweightPostingSource |
| class | CheckBoundsPostingSource |
| class | CloneTestPostingSource |
| class | OnlyTheFirstPostingSource |
| class | EstimatePS |
| PostingSource subclass for injecting tf bounds and estimate. More... | |
Functions | |
| DEFINE_TESTCASE (externalsource1, backend &&!remote &&!multi) | |
| DEFINE_TESTCASE (externalsource2, remote) | |
| DEFINE_TESTCASE (externalsource3, backend &&!remote &&!multi) | |
| DEFINE_TESTCASE (externalsource4, backend &&!remote) | |
| DEFINE_TESTCASE (valueweightsource1, backend) | |
| DEFINE_TESTCASE (valueweightsource2, valuestats) | |
| DEFINE_TESTCASE (valueweightsource3, valuestats) | |
| DEFINE_TESTCASE (fixedweightsource1, backend) | |
| DEFINE_TESTCASE (changemaxweightsource1, backend &&!remote &&!multi) | |
| DEFINE_TESTCASE (emptyvalwtsource1, backend &&!remote &&!multi) | |
| DEFINE_TESTCASE (matchtimelimit1, backend &&!remote) | |
| DEFINE_TESTCASE (postingsourcebounds1, backend &&!remote) | |
| DEFINE_TESTCASE (postingsourceclone1, !backend) | |
| Test cloning of initial object, which regressed in 1.3.5. More... | |
| DEFINE_TESTCASE (postingsourceshardindex1, multi &&!remote) | |
| DEFINE_TESTCASE (estimaterounding1, backend &&!multi &&!remote) | |
| Check estimate is rounded to suitable number of S.F. - new in 1.4.3. More... | |
tests of posting sources
Definition in file api_postingsource.cc.
| DEFINE_TESTCASE | ( | changemaxweightsource1 | , |
| backend &&!remote &&! | multi | ||
| ) |
Definition at line 496 of file api_postingsource.cc.
References ChangeMaxweightPostingSource::at_end(), Xapian::MSet::begin(), Xapian::Enquire::DESCENDING, Xapian::MSet::end(), get_database(), ChangeMaxweightPostingSource::get_docid(), Xapian::PostingSource::get_maxweight(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Query::OP_AND, Xapian::Enquire::set_docid_order(), Xapian::Enquire::set_query(), TEST, TEST_EQUAL, and TEST_EQUAL_DOUBLE.
| DEFINE_TESTCASE | ( | emptyvalwtsource1 | , |
| backend &&!remote &&! | multi | ||
| ) |
Definition at line 540 of file api_postingsource.cc.
References get_database(), Xapian::MSet::get_max_possible(), Xapian::Enquire::get_mset(), Xapian::Query::OP_AND_MAYBE, Xapian::Query::OP_OR, Xapian::Enquire::set_query(), Xapian::MSet::size(), TEST_EQUAL, and TEST_REL.
| DEFINE_TESTCASE | ( | estimaterounding1 | , |
| backend &&!multi &&! | remote | ||
| ) |
Check estimate is rounded to suitable number of S.F. - new in 1.4.3.
Definition at line 877 of file api_postingsource.cc.
References get_database(), Xapian::MSet::get_description(), Xapian::MSet::get_matches_estimated(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), TEST_EQUAL, testcases, and tout.
| DEFINE_TESTCASE | ( | externalsource1 | , |
| backend &&!remote &&! | multi | ||
| ) |
Definition at line 90 of file api_postingsource.cc.
References get_database(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Query::OP_FILTER, Xapian::Enquire::set_query(), and TEST_EXCEPTION.
| DEFINE_TESTCASE | ( | externalsource2 | , |
| remote | |||
| ) |
Definition at line 119 of file api_postingsource.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Query::OP_FILTER, Xapian::Enquire::set_query(), and TEST_EXCEPTION.
| DEFINE_TESTCASE | ( | externalsource3 | , |
| backend &&!remote &&! | multi | ||
| ) |
Definition at line 199 of file api_postingsource.cc.
References Xapian::MSet::empty(), get_database(), Xapian::MSet::get_max_possible(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Query::OP_OR, Xapian::Query::OP_SCALE_WEIGHT, Xapian::Enquire::set_cutoff(), Xapian::Enquire::set_query(), TEST, TEST_EQUAL, and tout.
| DEFINE_TESTCASE | ( | externalsource4 | , |
| backend &&! | remote | ||
| ) |
Definition at line 302 of file api_postingsource.cc.
References get_database(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Query::OP_FILTER, Xapian::Query::OP_SCALE_WEIGHT, Xapian::Enquire::set_query(), Xapian::Enquire::set_weighting_scheme(), and tout.
| DEFINE_TESTCASE | ( | fixedweightsource1 | , |
| backend | |||
| ) |
Definition at line 388 of file api_postingsource.cc.
References Xapian::FixedWeightPostingSource::at_end(), Xapian::MSet::begin(), Xapian::FixedWeightPostingSource::check(), Xapian::MSet::end(), get_database(), Xapian::FixedWeightPostingSource::get_docid(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::FixedWeightPostingSource::next(), Xapian::FixedWeightPostingSource::reset(), Xapian::Enquire::set_query(), Xapian::FixedWeightPostingSource::skip_to(), TEST, and TEST_EQUAL.
| DEFINE_TESTCASE | ( | matchtimelimit1 | , |
| backend &&! | remote | ||
| ) |
Definition at line 628 of file api_postingsource.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), Xapian::Enquire::set_time_limit(), Xapian::MSet::size(), SKIP_TEST, and TEST_EQUAL.
| DEFINE_TESTCASE | ( | postingsourcebounds1 | , |
| backend &&! | remote | ||
| ) |
Definition at line 678 of file api_postingsource.cc.
References get_database(), Xapian::Database::get_doclength_lower_bound(), Xapian::Database::get_doclength_upper_bound(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), and TEST_EQUAL.
| DEFINE_TESTCASE | ( | postingsourceclone1 | , |
| ! | backend | ||
| ) |
Test cloning of initial object, which regressed in 1.3.5.
Definition at line 731 of file api_postingsource.cc.
References Xapian::PostingSource::release(), and TEST_EQUAL.
| DEFINE_TESTCASE | ( | postingsourceshardindex1 | , |
| multi &&! | remote | ||
| ) |
Definition at line 809 of file api_postingsource.cc.
References get_database(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Enquire::set_query(), and TEST_EXCEPTION.
| DEFINE_TESTCASE | ( | valueweightsource1 | , |
| backend | |||
| ) |
Definition at line 331 of file api_postingsource.cc.
References get_database(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Query::OP_FILTER, Xapian::Enquire::set_query(), and tout.
| DEFINE_TESTCASE | ( | valueweightsource2 | , |
| valuestats | |||
| ) |
Definition at line 363 of file api_postingsource.cc.
References get_database(), Xapian::PostingSource::get_maxweight(), Xapian::ValuePostingSource::get_termfreq_est(), Xapian::ValuePostingSource::get_termfreq_max(), Xapian::ValuePostingSource::get_termfreq_min(), Xapian::ValueWeightPostingSource::reset(), and TEST_EQUAL.
| DEFINE_TESTCASE | ( | valueweightsource3 | , |
| valuestats | |||
| ) |
Definition at line 374 of file api_postingsource.cc.
References Xapian::ValuePostingSource::at_end(), get_database(), Xapian::ValuePostingSource::get_docid(), Xapian::ValueWeightPostingSource::reset(), Xapian::ValuePostingSource::skip_to(), TEST, and TEST_EQUAL.