xapian-core  1.4.19
Functions
testutils.cc File Reference

Xapian-specific test helper functions. More...

#include <config.h>
#include "testutils.h"
#include "testsuite.h"
#include <fstream>
#include <vector>
+ Include dependency graph for testutils.cc:

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)
 

Detailed Description

Xapian-specific test helper functions.

Definition in file testutils.cc.

Function Documentation

◆ mset_expect_order()

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!=().

◆ mset_expect_order_()

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 
)
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().

◆ mset_range_is_same() [1/2]

bool mset_range_is_same ( const Xapian::MSet mset1,
unsigned int  first1,
const Xapian::MSet mset2,
unsigned int  first2,
unsigned int  count 
)

◆ mset_range_is_same() [2/2]

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.

◆ mset_range_is_same_weights()

bool mset_range_is_same_weights ( const Xapian::MSet mset1,
unsigned int  first1,
const Xapian::MSet mset2,
unsigned int  first2,
unsigned int  count 
)

◆ operator<<()

ostream& operator<< ( ostream &  os,
const vector< Xapian::docid > &  ints 
)

Definition at line 35 of file testutils.cc.

◆ operator==()

bool operator== ( const Xapian::MSet first,
const Xapian::MSet second 
)

◆ test_mset_order_equal()

void test_mset_order_equal ( const Xapian::MSet mset1,
const Xapian::MSet mset2 
)