xapian-core
1.4.25
|
tests which don't use any of the backends More...
#include <config.h>
#include "api_nodb.h"
#include <xapian.h>
#include "apitest.h"
#include "testsuite.h"
#include "testutils.h"
#include <list>
#include <string>
#include <vector>
Go to the source code of this file.
Functions | |
DEFINE_TESTCASE (getqterms1, !backend) | |
DEFINE_TESTCASE (getqterms2, !backend) | |
DEFINE_TESTCASE (emptyquery2, !backend) | |
DEFINE_TESTCASE (emptyquery3, !backend) | |
Regression test for behaviour for an empty query with AND_NOT. More... | |
DEFINE_TESTCASE (querylen1, !backend) | |
DEFINE_TESTCASE (querylen2, !backend) | |
DEFINE_TESTCASE (dontflattensubqueries1, !backend) | |
Check we no longer flatten subqueries combined with the same operator. More... | |
DEFINE_TESTCASE (emptyquerypart1, !backend) | |
DEFINE_TESTCASE (stemlangs1, !backend) | |
DEFINE_TESTCASE (weight1, !backend) | |
DEFINE_TESTCASE (nosuchdb1, !backend) | |
DEFINE_TESTCASE (addvalue1, !backend) | |
DEFINE_TESTCASE (poscollapse2, !backend) | |
DEFINE_TESTCASE (uninitdb1, !backend) | |
DEFINE_TESTCASE (scaleweight3, !backend) | |
DEFINE_TESTCASE (rset3, !backend) | |
DEFINE_TESTCASE (rset4, !backend) | |
DEFINE_TESTCASE (valuesetmatchdecider1, !backend) | |
DEFINE_TESTCASE (emptymset1, !backend) | |
DEFINE_TESTCASE (expanddeciderfilterprefix1, !backend) | |
tests which don't use any of the backends
Definition in file api_nodb.cc.
DEFINE_TESTCASE | ( | getqterms1 | , |
! | backend | ||
) |
Definition at line 43 of file api_nodb.cc.
References Xapian::Query::get_terms_begin(), Xapian::Query::get_terms_end(), Xapian::Query::OP_AND, Xapian::Query::OP_OR, and TEST.
DEFINE_TESTCASE | ( | getqterms2 | , |
! | backend | ||
) |
Definition at line 71 of file api_nodb.cc.
References Xapian::Query::get_terms_begin(), Xapian::Query::get_terms_end(), Xapian::Query::get_unique_terms_begin(), Xapian::Query::get_unique_terms_end(), and TEST_EQUAL.
DEFINE_TESTCASE | ( | emptyquery2 | , |
! | backend | ||
) |
Definition at line 79 of file api_nodb.cc.
References Xapian::Query::OP_OR, and TEST.
DEFINE_TESTCASE | ( | emptyquery3 | , |
! | backend | ||
) |
Regression test for behaviour for an empty query with AND_NOT.
Definition at line 90 of file api_nodb.cc.
References Xapian::Query::get_description(), Xapian::Query::OP_AND, Xapian::Query::OP_AND_MAYBE, Xapian::Query::OP_AND_NOT, Xapian::Query::OP_OR, Xapian::Query::OP_XOR, and tout.
DEFINE_TESTCASE | ( | querylen1 | , |
! | backend | ||
) |
Definition at line 113 of file api_nodb.cc.
References Xapian::Query::empty(), Xapian::Query::get_length(), Xapian::Query::OP_AND, Xapian::Query::OP_OR, TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | querylen2 | , |
! | backend | ||
) |
Definition at line 130 of file api_nodb.cc.
References Xapian::Query::OP_AND, Xapian::Query::OP_OR, TEST_EQUAL, and tout.
DEFINE_TESTCASE | ( | dontflattensubqueries1 | , |
! | backend | ||
) |
Check we no longer flatten subqueries combined with the same operator.
Prior to 1.3.0 we did flatten these, but it's simpler to just handle this when we convert the query to a PostList tree, and that works better with Query objects being immutable.
Definition at line 179 of file api_nodb.cc.
References Xapian::Query::OP_AND, Xapian::Query::OP_OR, and TEST_EQUAL.
DEFINE_TESTCASE | ( | emptyquerypart1 | , |
! | backend | ||
) |
Definition at line 204 of file api_nodb.cc.
References Xapian::Query::OP_AND, Xapian::Query::OP_OR, query(), and TEST.
DEFINE_TESTCASE | ( | stemlangs1 | , |
! | backend | ||
) |
Definition at line 213 of file api_nodb.cc.
References Xapian::Stem::get_available_languages(), Xapian::Stem::get_description(), Xapian::Stem::is_none(), language, stemmer, TEST, TEST_EQUAL, TEST_NOT_EQUAL, and tout.
DEFINE_TESTCASE | ( | weight1 | , |
! | backend | ||
) |
Definition at line 262 of file api_nodb.cc.
References Xapian::Weight::DIRICHLET_SMOOTHING, Xapian::BoolWeight::name(), Xapian::TfIdfWeight::name(), Xapian::BM25Weight::name(), Xapian::BM25PlusWeight::name(), Xapian::TradWeight::name(), Xapian::InL2Weight::name(), Xapian::IfB2Weight::name(), Xapian::IneB2Weight::name(), Xapian::BB2Weight::name(), Xapian::PL2Weight::name(), Xapian::PL2PlusWeight::name(), Xapian::LMWeight::name(), Xapian::CoordWeight::name(), Xapian::BoolWeight::serialise(), Xapian::TfIdfWeight::serialise(), Xapian::BM25Weight::serialise(), Xapian::BM25PlusWeight::serialise(), Xapian::TradWeight::serialise(), Xapian::InL2Weight::serialise(), Xapian::IfB2Weight::serialise(), Xapian::IneB2Weight::serialise(), Xapian::BB2Weight::serialise(), Xapian::PL2Weight::serialise(), Xapian::PL2PlusWeight::serialise(), Xapian::LMWeight::serialise(), Xapian::CoordWeight::serialise(), TEST_EQUAL, TEST_NOT_EQUAL, Xapian::BoolWeight::unserialise(), Xapian::TfIdfWeight::unserialise(), Xapian::BM25Weight::unserialise(), Xapian::BM25PlusWeight::unserialise(), Xapian::TradWeight::unserialise(), Xapian::InL2Weight::unserialise(), Xapian::IfB2Weight::unserialise(), Xapian::IneB2Weight::unserialise(), Xapian::BB2Weight::unserialise(), Xapian::DLHWeight::unserialise(), Xapian::PL2Weight::unserialise(), Xapian::PL2PlusWeight::unserialise(), Xapian::DPHWeight::unserialise(), Xapian::LMWeight::unserialise(), and Xapian::CoordWeight::unserialise().
DEFINE_TESTCASE | ( | nosuchdb1 | , |
! | backend | ||
) |
Definition at line 409 of file api_nodb.cc.
References Xapian::Database::check(), FAIL_TEST, Xapian::Error::get_msg(), and TEST_STRINGS_EQUAL.
DEFINE_TESTCASE | ( | addvalue1 | , |
! | backend | ||
) |
Definition at line 433 of file api_nodb.cc.
References Xapian::Document::add_value(), Xapian::Document::get_value(), Xapian::Document::remove_value(), and TEST_EQUAL.
DEFINE_TESTCASE | ( | poscollapse2 | , |
! | backend | ||
) |
Definition at line 454 of file api_nodb.cc.
References Xapian::Query::get_length(), Xapian::Query::OP_OR, and TEST_EQUAL.
DEFINE_TESTCASE | ( | uninitdb1 | , |
! | backend | ||
) |
Definition at line 461 of file api_nodb.cc.
References TEST_EXCEPTION.
DEFINE_TESTCASE | ( | scaleweight3 | , |
! | backend | ||
) |
Definition at line 468 of file api_nodb.cc.
References Xapian::Query::get_description(), Xapian::Query::MatchNothing, Xapian::Query::OP_SCALE_WEIGHT, query(), and TEST_EQUAL.
DEFINE_TESTCASE | ( | rset3 | , |
! | backend | ||
) |
Definition at line 475 of file api_nodb.cc.
References Xapian::RSet::add_document(), Xapian::RSet::empty(), Xapian::RSet::size(), TEST, TEST_EQUAL, and TEST_EXCEPTION.
DEFINE_TESTCASE | ( | rset4 | , |
! | backend | ||
) |
Definition at line 488 of file api_nodb.cc.
References Xapian::RSet::add_document(), Xapian::RSet::get_description(), and TEST_STRINGS_EQUAL.
DEFINE_TESTCASE | ( | valuesetmatchdecider1 | , |
! | backend | ||
) |
Definition at line 496 of file api_nodb.cc.
References Xapian::ValueSetMatchDecider::add_value(), Xapian::Document::add_value(), Xapian::ValueSetMatchDecider::remove_value(), and TEST.
DEFINE_TESTCASE | ( | emptymset1 | , |
! | backend | ||
) |
Definition at line 531 of file api_nodb.cc.
References Xapian::MSet::get_termfreq(), and TEST_EXCEPTION.
DEFINE_TESTCASE | ( | expanddeciderfilterprefix1 | , |
! | backend | ||
) |
Definition at line 537 of file api_nodb.cc.
References TEST.