|
xapian-core
1.4.31
|
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"#include <vector>
Include dependency graph for api_none.cc: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) |
| #define | lit_a "a" |
| #define | lit_b "b" |
| #define | pairwisequery1_(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 (pairwisequery1, !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... | |
| DEFINE_TESTCASE (stlesetiterator, !backend) | |
| DEFINE_TESTCASE (stlmsetiterator, !backend) | |
| DEFINE_TESTCASE (stlpositioniterator, !backend) | |
| DEFINE_TESTCASE (stlpostingiterator, !backend) | |
| DEFINE_TESTCASE (stltermiterator, !backend) | |
| DEFINE_TESTCASE (stlutf8iterator, !backend) | |
| DEFINE_TESTCASE (stlvalueiterator, !backend) | |
tests which don't need a backend
Definition in file api_none.cc.
| #define lit_a "a" |
| #define lit_b "b" |
| #define pairwisequery1_ | ( | OP | ) |
| #define singlesubquery1_ | ( | OP | ) |
| #define singlesubquery2_ | ( | OP | ) |
| #define singlesubquery3_ | ( | OP | ) |
| #define XAPIAN_DEPRECATED | ( | D | ) | D |
Definition at line 27 of file api_none.cc.
| DEFINE_TESTCASE | ( | combinewqfnomore1 | , |
| ! | backend | ||
| ) |
Check we no longer combine wqf for same term at the same position.
Definition at line 284 of file api_none.cc.
References Xapian::Query::get_description(), Xapian::Query::OP_OR, and TEST_EQUAL.
| DEFINE_TESTCASE | ( | deletewhileiterating1 | , |
| ! | backend | ||
| ) |
Test removal of terms from a document while iterating over them.
Prior to 1.4.6 the underlying iterator was invalidated when preinc == false, leading to undefined behaviour (typically a segmentation fault).
Definition at line 939 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 | ( | document1 | , |
| ! | backend | ||
| ) |
Feature test for Document::add_boolean_term(), new in 1.0.18/1.1.4.
Definition at line 72 of file api_none.cc.
References Xapian::Document::add_boolean_term(), Xapian::TermIterator::get_wdf(), 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 87 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 95 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 124 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 150 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 172 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 | ( | errorcopyctor | , |
| ! | backend | ||
| ) |
Regression test for warning with GCC 9.
Definition at line 1036 of file api_none.cc.
References errorcopyctor_helper(), and FAIL_TEST.
| DEFINE_TESTCASE | ( | nonutf8docdesc1 | , |
| ! | backend | ||
| ) |
Check encoding of non-UTF8 document data.
Definition at line 919 of file api_none.cc.
References Xapian::Document::get_description(), Xapian::Document::set_data(), and TEST_EQUAL.
| DEFINE_TESTCASE | ( | nosubdatabases1 | , |
| ! | backend | ||
| ) |
Definition at line 51 of file api_none.cc.
References Xapian::Database::allterms_begin(), Xapian::Database::allterms_end(), Xapian::WritableDatabase::begin_transaction(), Xapian::WritableDatabase::cancel_transaction(), Xapian::WritableDatabase::commit_transaction(), 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 | ( | pairwisequery1 | , |
| ! | backend | ||
| ) |
Definition at line 246 of file api_none.cc.
References lit_a, lit_b, and pairwisequery1_.
| DEFINE_TESTCASE | ( | removepostings | , |
| ! | backend | ||
| ) |
Feature test for Document::remove_postings().
Definition at line 962 of file api_none.cc.
References Xapian::Document::add_posting(), Xapian::TermIterator::get_wdf(), Xapian::TermIterator::positionlist_begin(), Xapian::TermIterator::positionlist_count(), Xapian::TermIterator::positionlist_end(), Xapian::Document::remove_postings(), Xapian::Document::termlist_begin(), Xapian::Document::termlist_count(), and TEST_EQUAL.
| DEFINE_TESTCASE | ( | singlesubquery1 | , |
| ! | backend | ||
| ) |
Definition at line 189 of file api_none.cc.
References singlesubquery1_.
| DEFINE_TESTCASE | ( | singlesubquery2 | , |
| ! | backend | ||
| ) |
Definition at line 209 of file api_none.cc.
References Xapian::Query::MatchNothing, and singlesubquery2_.
| DEFINE_TESTCASE | ( | singlesubquery3 | , |
| ! | backend | ||
| ) |
Definition at line 228 of file api_none.cc.
References Xapian::Query::MatchAll, and singlesubquery3_.
| DEFINE_TESTCASE | ( | stlesetiterator | , |
| ! | backend | ||
| ) |
Definition at line 1047 of file api_none.cc.
References Xapian::ESet::begin(), and Xapian::ESet::end().
| DEFINE_TESTCASE | ( | stlmsetiterator | , |
| ! | backend | ||
| ) |
Definition at line 1055 of file api_none.cc.
References Xapian::MSet::begin(), and Xapian::MSet::end().
| DEFINE_TESTCASE | ( | stlpositioniterator | , |
| ! | backend | ||
| ) |
Definition at line 1064 of file api_none.cc.
References Xapian::Database::get_doccount(), Xapian::Database::positionlist_begin(), and Xapian::Database::positionlist_end().
| DEFINE_TESTCASE | ( | stlpostingiterator | , |
| ! | backend | ||
| ) |
Definition at line 1077 of file api_none.cc.
References Xapian::Database::postlist_begin(), and Xapian::Database::postlist_end().
| DEFINE_TESTCASE | ( | stltermiterator | , |
| ! | backend | ||
| ) |
Definition at line 1086 of file api_none.cc.
References Xapian::Document::termlist_begin(), and Xapian::Document::termlist_end().
| DEFINE_TESTCASE | ( | stlutf8iterator | , |
| ! | backend | ||
| ) |
Definition at line 1095 of file api_none.cc.
| DEFINE_TESTCASE | ( | stlvalueiterator | , |
| ! | backend | ||
| ) |
Definition at line 1103 of file api_none.cc.
References Xapian::Document::values_begin(), and Xapian::Document::values_end().
| DEFINE_TESTCASE | ( | subclassablerefcount1 | , |
| ! | backend | ||
| ) |
Check reference counting of user-subclassable classes.
Definition at line 319 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 400 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 462 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 526 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 596 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 677 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 758 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 848 of file api_none.cc.
References Xapian::QueryParser::add_valuerangeprocessor(), Xapian::ValueRangeProcessor::release(), and TEST.
| DEFINE_TESTCASE | ( | version1 | , |
| ! | backend | ||
| ) |
Definition at line 40 of file api_none.cc.
References Xapian::major_version(), Xapian::minor_version(), Xapian::revision(), Xapian::Internal::str(), TEST_EQUAL, and Xapian::version_string().
|
static |
Definition at line 1028 of file api_none.cc.
Referenced by DEFINE_TESTCASE().