xapian-core
1.4.26
|
Xapian-specific test helper functions. More...
#include <config.h>
#include "testutils.h"
#include "testsuite.h"
#include <fstream>
#include <vector>
Go to the source code of this file.
Functions | |
ostream & | operator<< (ostream &os, const vector< Xapian::docid > &ints) |
bool | mset_range_is_same (const Xapian::MSet &mset1, unsigned int first1, const Xapian::MSet &mset2, unsigned int first2, unsigned int count) |
bool | mset_range_is_same (const Xapian::MSet &mset, unsigned int first, const pair< Xapian::docid, double > to_compare[], unsigned int count) |
bool | mset_range_is_same_weights (const Xapian::MSet &mset1, unsigned int first1, const Xapian::MSet &mset2, unsigned int first2, unsigned int count) |
bool | operator== (const Xapian::MSet &first, const Xapian::MSet &second) |
static void | mset_expect_order_ (const Xapian::MSet &A, bool beginning, Xapian::docid d1, Xapian::docid d2, Xapian::docid d3, Xapian::docid d4, Xapian::docid d5, Xapian::docid d6, Xapian::docid d7, Xapian::docid d8, Xapian::docid d9, Xapian::docid d10, Xapian::docid d11, Xapian::docid d12) |
void | mset_expect_order (const Xapian::MSet &A, Xapian::docid d1, Xapian::docid d2, Xapian::docid d3, Xapian::docid d4, Xapian::docid d5, Xapian::docid d6, Xapian::docid d7, Xapian::docid d8, Xapian::docid d9, Xapian::docid d10, Xapian::docid d11, Xapian::docid d12) |
void | test_mset_order_equal (const Xapian::MSet &mset1, const Xapian::MSet &mset2) |
Xapian-specific test helper functions.
Definition in file testutils.cc.
void mset_expect_order | ( | const Xapian::MSet & | A, |
Xapian::docid | d1, | ||
Xapian::docid | d2, | ||
Xapian::docid | d3, | ||
Xapian::docid | d4, | ||
Xapian::docid | d5, | ||
Xapian::docid | d6, | ||
Xapian::docid | d7, | ||
Xapian::docid | d8, | ||
Xapian::docid | d9, | ||
Xapian::docid | d10, | ||
Xapian::docid | d11, | ||
Xapian::docid | d12 | ||
) |
Definition at line 225 of file testutils.cc.
References mset_expect_order_().
Referenced by DEFINE_TESTCASE(), and operator!=().
|
static |
Definition at line 155 of file testutils.cc.
References Xapian::MSet::begin(), Xapian::MSet::size(), and TEST_AND_EXPLAIN.
Referenced by mset_expect_order().
bool mset_range_is_same | ( | const Xapian::MSet & | mset1, |
unsigned int | first1, | ||
const Xapian::MSet & | mset2, | ||
unsigned int | first2, | ||
unsigned int | count | ||
) |
Definition at line 46 of file testutils.cc.
References Xapian::MSetIterator::get_weight(), Xapian::MSet::size(), TEST_AND_EXPLAIN, TEST_EQUAL_DOUBLE_(), and tout.
Referenced by DEFINE_TESTCASE(), and operator==().
bool mset_range_is_same | ( | const Xapian::MSet & | mset, |
unsigned int | first, | ||
const pair< Xapian::docid, double > | to_compare[], | ||
unsigned int | count | ||
) |
Definition at line 82 of file testutils.cc.
References Xapian::MSet::size(), TEST_AND_EXPLAIN, TEST_EQUAL_DOUBLE_(), and tout.
bool mset_range_is_same_weights | ( | const Xapian::MSet & | mset1, |
unsigned int | first1, | ||
const Xapian::MSet & | mset2, | ||
unsigned int | first2, | ||
unsigned int | count | ||
) |
Definition at line 111 of file testutils.cc.
References Xapian::MSetIterator::get_weight(), Xapian::MSet::size(), TEST_AND_EXPLAIN, TEST_EQUAL_DOUBLE_(), and tout.
Referenced by DEFINE_TESTCASE().
ostream& operator<< | ( | ostream & | os, |
const vector< Xapian::docid > & | ints | ||
) |
Definition at line 35 of file testutils.cc.
bool operator== | ( | const Xapian::MSet & | first, |
const Xapian::MSet & | second | ||
) |
Definition at line 141 of file testutils.cc.
References Xapian::MSet::empty(), Xapian::MSet::get_matches_estimated(), Xapian::MSet::get_matches_lower_bound(), Xapian::MSet::get_matches_upper_bound(), Xapian::MSet::get_max_possible(), mset_range_is_same(), and Xapian::MSet::size().
void test_mset_order_equal | ( | const Xapian::MSet & | mset1, |
const Xapian::MSet & | mset2 | ||
) |
Definition at line 234 of file testutils.cc.
References Xapian::MSet::begin(), Xapian::MSet::end(), Xapian::MSet::size(), and TEST_AND_EXPLAIN.
Referenced by DEFINE_TESTCASE(), and operator!=().