xapian-core
1.4.26
|
tests which don't need a backend More...
#include <config.h>
#include "api_none.h"
#include <xapian.h>
#include "apitest.h"
#include "str.h"
#include "testsuite.h"
#include "testutils.h"
Go to the source code of this file.
Classes | |
class | DestroyedFlag |
class | TestRangeProcessor |
class | TestFieldProcessor |
class | TestMatchSpy |
class | TestStopper |
class | TestKeyMaker |
class | TestExpandDecider |
class | TestValueRangeProcessor |
Macros | |
#define | XAPIAN_DEPRECATED(D) D |
#define | singlesubquery1_(OP) |
#define | singlesubquery2_(OP) |
#define | singlesubquery3_(OP) |
Functions | |
DEFINE_TESTCASE (version1, !backend) | |
DEFINE_TESTCASE (nosubdatabases1, !backend) | |
DEFINE_TESTCASE (document1, !backend) | |
Feature test for Document::add_boolean_term(), new in 1.0.18/1.1.4. More... | |
DEFINE_TESTCASE (document2, !backend) | |
Regression test - the docid wasn't initialised prior to 1.0.22/1.2.4. More... | |
DEFINE_TESTCASE (documentclearterms1, !backend) | |
Feature tests for Document::clear_terms(). More... | |
DEFINE_TESTCASE (documentclearvalues1, !backend) | |
Feature tests for Document::clear_values(). More... | |
DEFINE_TESTCASE (documentemptyterm1, !backend) | |
Feature tests for errors for empty terms. More... | |
DEFINE_TESTCASE (emptyquery4, !backend) | |
DEFINE_TESTCASE (singlesubquery1, !backend) | |
DEFINE_TESTCASE (singlesubquery2, !backend) | |
DEFINE_TESTCASE (singlesubquery3, !backend) | |
DEFINE_TESTCASE (combinewqfnomore1, !backend) | |
Check we no longer combine wqf for same term at the same position. More... | |
DEFINE_TESTCASE (subclassablerefcount1, !backend) | |
Check reference counting of user-subclassable classes. More... | |
DEFINE_TESTCASE (subclassablerefcount2, !backend) | |
Check reference counting of user-subclassable classes. More... | |
DEFINE_TESTCASE (subclassablerefcount3, backend) | |
Check reference counting of MatchSpy. More... | |
DEFINE_TESTCASE (subclassablerefcount4, !backend) | |
Check reference counting of Stopper with QueryParser. More... | |
DEFINE_TESTCASE (subclassablerefcount5, !backend) | |
Check reference counting of Stopper with TermGenerator. More... | |
DEFINE_TESTCASE (subclassablerefcount6, backend) | |
Check reference counting of KeyMaker. More... | |
DEFINE_TESTCASE (subclassablerefcount7, backend) | |
Check reference counting of ExpandDecider. More... | |
DEFINE_TESTCASE (subclassablerefcount8, !backend) | |
Check reference counting of user-subclassable classes. More... | |
DEFINE_TESTCASE (nonutf8docdesc1, !backend) | |
Check encoding of non-UTF8 document data. More... | |
DEFINE_TESTCASE (deletewhileiterating1, !backend) | |
Test removal of terms from a document while iterating over them. More... | |
DEFINE_TESTCASE (removepostings, !backend) | |
Feature test for Document::remove_postings(). More... | |
static void | errorcopyctor_helper (Xapian::Error &error) |
DEFINE_TESTCASE (errorcopyctor, !backend) | |
Regression test for warning with GCC 9. More... | |
tests which don't need a backend
Definition in file api_none.cc.
#define singlesubquery1_ | ( | OP | ) |
Referenced by DEFINE_TESTCASE().
#define singlesubquery2_ | ( | OP | ) |
Referenced by DEFINE_TESTCASE().
#define singlesubquery3_ | ( | OP | ) |
Referenced by DEFINE_TESTCASE().
#define XAPIAN_DEPRECATED | ( | D | ) | D |
Definition at line 27 of file api_none.cc.
DEFINE_TESTCASE | ( | version1 | , |
! | backend | ||
) |
Definition at line 38 of file api_none.cc.
References Xapian::major_version(), Xapian::minor_version(), Xapian::revision(), Xapian::Internal::str(), TEST_EQUAL, and Xapian::version_string().
DEFINE_TESTCASE | ( | nosubdatabases1 | , |
! | backend | ||
) |
Definition at line 49 of file api_none.cc.
References Xapian::Database::allterms_begin(), Xapian::Database::allterms_end(), Xapian::Database::get_doclength(), Xapian::Database::get_document(), Xapian::Database::get_lastdocid(), Xapian::Database::get_metadata(), Xapian::Database::get_unique_terms(), Xapian::Database::metadata_keys_begin(), Xapian::Database::metadata_keys_end(), Xapian::Database::positionlist_begin(), Xapian::Database::termlist_begin(), TEST, TEST_EQUAL, TEST_EXCEPTION, Xapian::Database::valuestream_begin(), and Xapian::Database::valuestream_end().
DEFINE_TESTCASE | ( | document1 | , |
! | backend | ||
) |
Feature test for Document::add_boolean_term(), new in 1.0.18/1.1.4.
Definition at line 70 of file api_none.cc.
References Xapian::Document::add_boolean_term(), Xapian::Document::remove_term(), Xapian::Document::termlist_begin(), Xapian::Document::termlist_count(), Xapian::Document::termlist_end(), TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | document2 | , |
! | backend | ||
) |
Regression test - the docid wasn't initialised prior to 1.0.22/1.2.4.
Definition at line 85 of file api_none.cc.
References Xapian::Document::get_docid(), and TEST_EQUAL.
DEFINE_TESTCASE | ( | documentclearterms1 | , |
! | backend | ||
) |
Feature tests for Document::clear_terms().
Definition at line 93 of file api_none.cc.
References Xapian::Document::add_boolean_term(), Xapian::Document::add_posting(), Xapian::Document::add_term(), Xapian::Document::clear_terms(), Xapian::Document::termlist_begin(), Xapian::Document::termlist_count(), Xapian::Document::termlist_end(), TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | documentclearvalues1 | , |
! | backend | ||
) |
Feature tests for Document::clear_values().
Definition at line 122 of file api_none.cc.
References Xapian::Document::add_value(), Xapian::Document::clear_values(), Xapian::Document::termlist_begin(), Xapian::Document::termlist_end(), TEST, TEST_EQUAL, Xapian::Document::values_begin(), Xapian::Document::values_count(), and Xapian::Document::values_end().
DEFINE_TESTCASE | ( | documentemptyterm1 | , |
! | backend | ||
) |
Feature tests for errors for empty terms.
Definition at line 148 of file api_none.cc.
References Xapian::Document::add_boolean_term(), Xapian::Document::add_posting(), Xapian::Document::add_term(), Xapian::Document::remove_posting(), Xapian::Document::remove_postings(), Xapian::Document::remove_term(), and TEST_EXCEPTION.
DEFINE_TESTCASE | ( | emptyquery4 | , |
! | backend | ||
) |
Definition at line 170 of file api_none.cc.
References Xapian::Query::empty(), Xapian::Query::OP_AND, Xapian::Query::OP_AND_MAYBE, Xapian::Query::OP_AND_NOT, Xapian::Query::OP_ELITE_SET, Xapian::Query::OP_FILTER, Xapian::Query::OP_MAX, Xapian::Query::OP_NEAR, Xapian::Query::OP_OR, Xapian::Query::OP_PHRASE, Xapian::Query::OP_SYNONYM, Xapian::Query::OP_XOR, and TEST.
DEFINE_TESTCASE | ( | singlesubquery1 | , |
! | backend | ||
) |
Definition at line 187 of file api_none.cc.
References singlesubquery1_.
DEFINE_TESTCASE | ( | singlesubquery2 | , |
! | backend | ||
) |
Definition at line 207 of file api_none.cc.
References Xapian::Query::MatchNothing, and singlesubquery2_.
DEFINE_TESTCASE | ( | singlesubquery3 | , |
! | backend | ||
) |
Definition at line 226 of file api_none.cc.
References Xapian::Query::MatchAll, and singlesubquery3_.
DEFINE_TESTCASE | ( | combinewqfnomore1 | , |
! | backend | ||
) |
Check we no longer combine wqf for same term at the same position.
Definition at line 245 of file api_none.cc.
References Xapian::Query::get_description(), Xapian::Query::OP_OR, and TEST_EQUAL.
DEFINE_TESTCASE | ( | subclassablerefcount1 | , |
! | backend | ||
) |
Check reference counting of user-subclassable classes.
Definition at line 280 of file api_none.cc.
References Xapian::QueryParser::add_rangeprocessor(), Xapian::RangeProcessor::release(), and TEST.
DEFINE_TESTCASE | ( | subclassablerefcount2 | , |
! | backend | ||
) |
Check reference counting of user-subclassable classes.
Definition at line 361 of file api_none.cc.
References Xapian::QueryParser::add_prefix(), Xapian::FieldProcessor::release(), and TEST.
DEFINE_TESTCASE | ( | subclassablerefcount3 | , |
backend | |||
) |
Check reference counting of MatchSpy.
Definition at line 423 of file api_none.cc.
References Xapian::Enquire::add_matchspy(), get_database(), Xapian::MatchSpy::release(), and TEST.
DEFINE_TESTCASE | ( | subclassablerefcount4 | , |
! | backend | ||
) |
Check reference counting of Stopper with QueryParser.
Definition at line 487 of file api_none.cc.
References Xapian::Stopper::release(), Xapian::QueryParser::set_stopper(), and TEST.
DEFINE_TESTCASE | ( | subclassablerefcount5 | , |
! | backend | ||
) |
Check reference counting of Stopper with TermGenerator.
Definition at line 557 of file api_none.cc.
References Xapian::Stopper::release(), Xapian::TermGenerator::set_stopper(), and TEST.
DEFINE_TESTCASE | ( | subclassablerefcount6 | , |
backend | |||
) |
Check reference counting of KeyMaker.
Definition at line 638 of file api_none.cc.
References get_database(), Xapian::KeyMaker::release(), Xapian::Enquire::set_sort_by_key(), Xapian::Enquire::set_sort_by_key_then_relevance(), Xapian::Enquire::set_sort_by_relevance_then_key(), and TEST.
DEFINE_TESTCASE | ( | subclassablerefcount7 | , |
backend | |||
) |
Check reference counting of ExpandDecider.
Definition at line 719 of file api_none.cc.
References Xapian::RSet::add_document(), get_database(), Xapian::Enquire::get_eset(), Xapian::Enquire::INCLUDE_QUERY_TERMS, Xapian::ExpandDecider::release(), and TEST.
DEFINE_TESTCASE | ( | subclassablerefcount8 | , |
! | backend | ||
) |
Check reference counting of user-subclassable classes.
Definition at line 809 of file api_none.cc.
References Xapian::QueryParser::add_valuerangeprocessor(), Xapian::ValueRangeProcessor::release(), and TEST.
DEFINE_TESTCASE | ( | nonutf8docdesc1 | , |
! | backend | ||
) |
Check encoding of non-UTF8 document data.
Definition at line 880 of file api_none.cc.
References Xapian::Document::get_description(), Xapian::Document::set_data(), and TEST_EQUAL.
DEFINE_TESTCASE | ( | deletewhileiterating1 | , |
! | backend | ||
) |
Test removal of terms from a document while iterating over them.
Prior to 1.5.0 and 1.4.6 the underlying iterator was invalidated when preinc == false, leading to undefined behaviour (typically a segmentation fault).
Definition at line 900 of file api_none.cc.
References Xapian::TermGenerator::index_text(), Xapian::Document::remove_term(), Xapian::TermGenerator::set_document(), Xapian::TermIterator::skip_to(), startswith(), Xapian::Document::termlist_begin(), Xapian::Document::termlist_count(), Xapian::Document::termlist_end(), TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | removepostings | , |
! | backend | ||
) |
Feature test for Document::remove_postings().
Definition at line 923 of file api_none.cc.
References Xapian::Document::add_posting(), Xapian::TermIterator::positionlist_count(), Xapian::Document::remove_postings(), Xapian::Document::termlist_begin(), Xapian::Document::termlist_count(), and TEST_EQUAL.
DEFINE_TESTCASE | ( | errorcopyctor | , |
! | backend | ||
) |
Regression test for warning with GCC 9.
Definition at line 997 of file api_none.cc.
References errorcopyctor_helper(), and FAIL_TEST.
|
static |
Definition at line 989 of file api_none.cc.
Referenced by DEFINE_TESTCASE().