xapian-core
1.4.26
|
tests of OP_SYNONYM and OP_MAX. More...
#include <config.h>
#include "api_opsynonym.h"
#include <map>
#include <set>
#include <vector>
#include <xapian.h>
#include "backendmanager.h"
#include "testsuite.h"
#include "testutils.h"
#include "apitest.h"
Go to the source code of this file.
Classes | |
struct | synonym1_data_type |
Macros | |
#define | NOQ Xapian::Query::MatchNothing |
Functions | |
DEFINE_TESTCASE (synonym1, backend) | |
DEFINE_TESTCASE (synonym2, backend) | |
static void | check_msets_contain_same_docs (const Xapian::MSet &mset1, const Xapian::MSet &mset2) |
DEFINE_TESTCASE (synonym3, backend) | |
DEFINE_TESTCASE (synonym4, backend) | |
DEFINE_TESTCASE (opmax1, backend) | |
Variables | |
static const synonym1_data_type | synonym1_data [] |
tests of OP_SYNONYM and OP_MAX.
Definition in file api_opsynonym.cc.
#define NOQ Xapian::Query::MatchNothing |
Definition at line 57 of file api_opsynonym.cc.
|
static |
Definition at line 329 of file api_opsynonym.cc.
References Xapian::MSet::size(), TEST, and TEST_EQUAL.
Referenced by DEFINE_TESTCASE().
DEFINE_TESTCASE | ( | synonym1 | , |
backend | |||
) |
Definition at line 225 of file api_opsynonym.cc.
References synonym1_data_type::diffweight_count, get_database(), Xapian::Database::get_doclength_upper_bound(), Xapian::Enquire::get_mset(), mset_range_is_same(), synonym1_data_type::n_subqs, Xapian::Query::OP_OR, Xapian::Query::OP_SYNONYM, synonym1_data_type::sameweight_count, Xapian::Enquire::set_query(), Xapian::MSet::size(), synonym1_data_type::subqs, synonym1_data, TEST, TEST_EQUAL, TEST_NOT_EQUAL, TEST_REL, and tout.
DEFINE_TESTCASE | ( | synonym2 | , |
backend | |||
) |
Definition at line 297 of file api_opsynonym.cc.
References get_database(), Xapian::MSet::get_max_possible(), Xapian::Enquire::get_mset(), Xapian::Query::OP_AND, Xapian::Query::OP_SCALE_WEIGHT, Xapian::Query::OP_SYNONYM, query(), Xapian::Enquire::set_query(), TEST_EQUAL_DOUBLE, and tout.
DEFINE_TESTCASE | ( | synonym3 | , |
backend | |||
) |
Definition at line 349 of file api_opsynonym.cc.
References check_msets_contain_same_docs(), get_database(), Xapian::Database::get_doccount(), Xapian::Enquire::get_mset(), Xapian::Query::OP_SCALE_WEIGHT, Xapian::Query::OP_SYNONYM, query(), Xapian::Enquire::set_query(), TEST_EQUAL, TEST_NOT_EQUAL, and tout.
DEFINE_TESTCASE | ( | synonym4 | , |
backend | |||
) |
Definition at line 383 of file api_opsynonym.cc.
References check_msets_contain_same_docs(), get_database(), Xapian::Database::get_doccount(), Xapian::Enquire::get_mset(), Xapian::Query::OP_AND, Xapian::Query::OP_AND_MAYBE, Xapian::Query::OP_AND_NOT, Xapian::Query::OP_OR, Xapian::Query::OP_SYNONYM, Xapian::Query::OP_XOR, Xapian::Enquire::set_query(), TEST, TEST_EQUAL, TEST_NOT_EQUAL, and tout.
DEFINE_TESTCASE | ( | opmax1 | , |
backend | |||
) |
Definition at line 429 of file api_opsynonym.cc.
References Xapian::MSet::begin(), Xapian::MSet::end(), get_database(), Xapian::Database::get_doccount(), Xapian::Enquire::get_mset(), Xapian::MSetIterator::get_weight(), Xapian::Query::OP_MAX, Xapian::Enquire::set_query(), TEST, TEST_EQUAL, TEST_EQUAL_DOUBLE, and tout.
|
static |
Definition at line 58 of file api_opsynonym.cc.
Referenced by DEFINE_TESTCASE().