xapian-core
1.4.26
|
tests of MSet sorting More...
#include <config.h>
#include "api_sorting.h"
#include <xapian.h>
#include "apitest.h"
#include "testutils.h"
Go to the source code of this file.
Classes | |
class | NeverUseMeKeyMaker |
Functions | |
DEFINE_TESTCASE (sortfunctor1, backend &&!remote) | |
DEFINE_TESTCASE (sortfunctor2, backend &&!remote) | |
Test reverse sort functor. More... | |
DEFINE_TESTCASE (sortfunctor3, backend &&!remote &&valuestats) | |
DEFINE_TESTCASE (changesorter1, backend &&!remote) | |
Regression test for changing away from a sorter. More... | |
DEFINE_TESTCASE (sortfunctorempty1, backend &&!remote) | |
Regression test - an empty MultiValueSorter hung in 1.0.9 and earlier. More... | |
DEFINE_TESTCASE (multivaluekeymaker1, !backend) | |
DEFINE_TESTCASE (sortfunctorremote1, remote) | |
tests of MSet sorting
Definition in file api_sorting.cc.
DEFINE_TESTCASE | ( | sortfunctor1 | , |
backend &&! | remote | ||
) |
Definition at line 33 of file api_sorting.cc.
References Xapian::MultiValueKeyMaker::add_value(), Xapian::MSet::begin(), Xapian::MSet::end(), get_database(), Xapian::Enquire::get_mset(), keys, mset_expect_order(), Xapian::Enquire::set_query(), Xapian::Enquire::set_sort_by_key(), and TEST_EQUAL.
DEFINE_TESTCASE | ( | sortfunctor2 | , |
backend &&! | remote | ||
) |
Test reverse sort functor.
Definition at line 119 of file api_sorting.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_term(), Xapian::Document::add_value(), Xapian::MultiValueKeyMaker::add_value(), get_database(), and mset_expect_order().
DEFINE_TESTCASE | ( | sortfunctor3 | , |
backend &&!remote && | valuestats | ||
) |
Definition at line 194 of file api_sorting.cc.
References Xapian::MultiValueKeyMaker::add_value(), get_database(), Xapian::Enquire::get_mset(), Xapian::Database::get_value_upper_bound(), mset_expect_order(), Xapian::Enquire::set_query(), and Xapian::Enquire::set_sort_by_key().
DEFINE_TESTCASE | ( | changesorter1 | , |
backend &&! | remote | ||
) |
Regression test for changing away from a sorter.
Definition at line 260 of file api_sorting.cc.
References FAIL_TEST, get_database(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), Xapian::Enquire::set_sort_by_key(), Xapian::Enquire::set_sort_by_relevance(), Xapian::Enquire::set_sort_by_relevance_then_value(), Xapian::Enquire::set_sort_by_value(), Xapian::Enquire::set_sort_by_value_then_relevance(), Xapian::MSet::size(), and TEST_EQUAL.
DEFINE_TESTCASE | ( | sortfunctorempty1 | , |
backend &&! | remote | ||
) |
Regression test - an empty MultiValueSorter hung in 1.0.9 and earlier.
Definition at line 295 of file api_sorting.cc.
References get_database(), Xapian::Enquire::get_mset(), mset_expect_order(), Xapian::Enquire::set_query(), and Xapian::Enquire::set_sort_by_key().
DEFINE_TESTCASE | ( | multivaluekeymaker1 | , |
! | backend | ||
) |
Definition at line 309 of file api_sorting.cc.
References Xapian::Document::add_value(), Xapian::MultiValueKeyMaker::add_value(), keys, TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | sortfunctorremote1 | , |
remote | |||
) |
Definition at line 342 of file api_sorting.cc.
References get_database(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), Xapian::Enquire::set_sort_by_key(), and TEST_EXCEPTION.