xapian-core
1.4.26
|
tests which need a backend with positional information More...
#include <config.h>
#include "api_posdb.h"
#include <string>
#include <vector>
#include <xapian.h>
#include "testsuite.h"
#include "testutils.h"
#include "apitest.h"
Go to the source code of this file.
Functions | |
DEFINE_TESTCASE (near1, positional) | |
Simple test of NEAR. More... | |
DEFINE_TESTCASE (near2, positional) | |
Test NEAR over operators. More... | |
DEFINE_TESTCASE (phrase1, positional) | |
Simple test of PHRASE. More... | |
DEFINE_TESTCASE (phrase2, positional) | |
Test PHRASE over operators. More... | |
DEFINE_TESTCASE (poslist1, positional) | |
Test getting position lists from databases. More... | |
DEFINE_TESTCASE (poslist2, positional &&writable) | |
DEFINE_TESTCASE (poslist3, positional &&writable) | |
Test playing with a positionlist, testing skip_to in particular. More... | |
DEFINE_TESTCASE (positfromtermit1, positional) | |
tests which need a backend with positional information
Definition in file api_posdb.cc.
DEFINE_TESTCASE | ( | near1 | , |
positional | |||
) |
Simple test of NEAR.
Definition at line 40 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 178 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(), stemmer, and TEST_EXCEPTION.
DEFINE_TESTCASE | ( | phrase1 | , |
positional | |||
) |
Simple test of PHRASE.
Definition at line 229 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(), stemmer, and TEST_EXCEPTION.
DEFINE_TESTCASE | ( | poslist1 | , |
positional | |||
) |
Test getting position lists from databases.
Definition at line 466 of file api_posdb.cc.
References get_database(), Xapian::Database::positionlist_begin(), Xapian::Database::positionlist_end(), stemmer, TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | poslist2 | , |
positional && | writable | ||
) |
Definition at line 501 of file api_posdb.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_posting(), 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(), and TEST_EQUAL.
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 551 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(), Xapian::PositionIterator::skip_to(), TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | positfromtermit1 | , |
positional | |||
) |
Definition at line 604 of file api_posdb.cc.
References get_database(), SKIP_TEST, Xapian::Database::termlist_begin(), Xapian::Database::termlist_end(), TEST_EQUAL, and TEST_NOT_EQUAL.