#include <config.h>
#include "api_posdb.h"
#include <string>
#include <vector>
#include <xapian.h>
#include "testsuite.h"
#include "testutils.h"
#include "apitest.h"
Include dependency graph for api_posdb.cc:
Go to the source code of this file.
Functions | |
DEFINE_TESTCASE (near1, positional) | |
Simple test of NEAR. | |
DEFINE_TESTCASE (near2, positional) | |
Test NEAR over operators. | |
DEFINE_TESTCASE (phrase1, positional) | |
Simple test of PHRASE. | |
DEFINE_TESTCASE (phrase2, positional) | |
Test PHRASE over operators. | |
DEFINE_TESTCASE (poslist1, positional) | |
Test getting position lists from databases. | |
DEFINE_TESTCASE (poslist2, positional &&writable) | |
DEFINE_TESTCASE (poslist3, positional &&writable) | |
Test playing with a positionlist, testing skip_to in particular. | |
DEFINE_TESTCASE (positfromtermit1, positional) |
DEFINE_TESTCASE | ( | near1 | , | |
positional | ||||
) |
Simple test of NEAR.
Definition at line 39 of file api_posdb.cc.
References get_database(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Query::OP_NEAR, Xapian::Query::OP_PHRASE, Xapian::Enquire::set_query(), Xapian::Enquire::set_weighting_scheme(), and stemmer.
DEFINE_TESTCASE | ( | near2 | , | |
positional | ||||
) |
Test NEAR over operators.
Definition at line 179 of file api_posdb.cc.
References get_database(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Query::OP_AND, Xapian::Query::OP_NEAR, Xapian::Enquire::set_query(), Xapian::Enquire::set_weighting_scheme(), and stemmer.
DEFINE_TESTCASE | ( | phrase1 | , | |
positional | ||||
) |
Simple test of PHRASE.
Definition at line 227 of file api_posdb.cc.
References get_database(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Query::OP_PHRASE, Xapian::Enquire::set_query(), Xapian::Enquire::set_weighting_scheme(), and stemmer.
DEFINE_TESTCASE | ( | phrase2 | , | |
positional | ||||
) |
Test PHRASE over operators.
Definition at line 415 of file api_posdb.cc.
References get_database(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Query::OP_AND, Xapian::Query::OP_PHRASE, Xapian::Enquire::set_query(), Xapian::Enquire::set_weighting_scheme(), and stemmer.
DEFINE_TESTCASE | ( | poslist1 | , | |
positional | ||||
) |
Test getting position lists from databases.
Definition at line 463 of file api_posdb.cc.
References get_database(), Xapian::Database::positionlist_begin(), Xapian::Database::positionlist_end(), stemmer, TEST, and TEST_EXCEPTION.
DEFINE_TESTCASE | ( | poslist2 | , | |
positional && | writable | |||
) |
Definition at line 508 of file api_posdb.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_term(), Xapian::WritableDatabase::delete_document(), Xapian::Database::get_document(), get_writable_database(), Xapian::TermIterator::positionlist_begin(), Xapian::Database::positionlist_begin(), Xapian::TermIterator::positionlist_end(), Xapian::Database::positionlist_end(), Xapian::Document::remove_posting(), Xapian::WritableDatabase::replace_document(), Xapian::Document::termlist_begin(), TEST_EQUAL, and TEST_EXCEPTION.
DEFINE_TESTCASE | ( | poslist3 | , | |
positional && | writable | |||
) |
Test playing with a positionlist, testing skip_to in particular.
(used to be quartztest's test_positionlist1).
Definition at line 564 of file api_posdb.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_posting(), get_writable_database(), Xapian::Database::positionlist_begin(), Xapian::Database::positionlist_end(), TEST, TEST_EQUAL, and TEST_EXCEPTION.
DEFINE_TESTCASE | ( | positfromtermit1 | , | |
positional | ||||
) |
Definition at line 624 of file api_posdb.cc.
References get_database(), SKIP_TEST, Xapian::Database::termlist_begin(), Xapian::Database::termlist_end(), TEST_EQUAL, and TEST_NOT_EQUAL.