xapian-core  1.4.19
Classes | Functions
api_postingsource.cc File Reference

tests of posting sources More...

#include <config.h>
#include "api_postingsource.h"
#include <xapian.h>
#include <string>
#include "safeunistd.h"
#include "str.h"
#include "testutils.h"
#include "apitest.h"
+ Include dependency graph for api_postingsource.cc:

Go to the source code of this file.

Classes

class  MyOddPostingSource
 
class  MyOddWeightingPostingSource
 
class  MyDontAskWeightPostingSource
 
class  ChangeMaxweightPostingSource
 
class  SlowDecreasingValueWeightPostingSource
 
class  CheckBoundsPostingSource
 
class  CloneTestPostingSource
 
class  OnlyTheFirstPostingSource
 
class  EstimatePS
 PostingSource subclass for injecting tf bounds and estimate. More...
 

Functions

 DEFINE_TESTCASE (externalsource1, backend &&!remote &&!multi)
 
 DEFINE_TESTCASE (externalsource2, remote)
 
 DEFINE_TESTCASE (externalsource3, backend &&!remote &&!multi)
 
 DEFINE_TESTCASE (externalsource4, backend &&!remote)
 
 DEFINE_TESTCASE (valueweightsource1, backend)
 
 DEFINE_TESTCASE (valueweightsource2, valuestats)
 
 DEFINE_TESTCASE (valueweightsource3, valuestats &&!multi)
 
 DEFINE_TESTCASE (fixedweightsource1, backend)
 
 DEFINE_TESTCASE (changemaxweightsource1, backend &&!remote &&!multi)
 
 DEFINE_TESTCASE (emptyvalwtsource1, backend &&!remote &&!multi)
 
static void make_matchtimelimit1_db (Xapian::WritableDatabase &db, const string &)
 
 DEFINE_TESTCASE (matchtimelimit1, generated &&!remote)
 
 DEFINE_TESTCASE (postingsourcebounds1, backend &&!remote)
 
 DEFINE_TESTCASE (postingsourceclone1, !backend)
 Test cloning of initial object, which regressed in 1.3.5. More...
 
 DEFINE_TESTCASE (postingsourceshardindex1, multi &&!remote)
 
 DEFINE_TESTCASE (estimaterounding1, backend &&!multi &&!remote)
 Check estimate is rounded to suitable number of S.F. - new in 1.4.3. More...
 

Detailed Description

tests of posting sources

Definition in file api_postingsource.cc.

Function Documentation

◆ DEFINE_TESTCASE() [1/15]

DEFINE_TESTCASE ( externalsource1  ,
backend &&!remote &&!  multi 
)

◆ DEFINE_TESTCASE() [2/15]

DEFINE_TESTCASE ( externalsource2  ,
remote   
)

◆ DEFINE_TESTCASE() [3/15]

DEFINE_TESTCASE ( externalsource3  ,
backend &&!remote &&!  multi 
)

◆ DEFINE_TESTCASE() [4/15]

DEFINE_TESTCASE ( externalsource4  ,
backend &&!  remote 
)

◆ DEFINE_TESTCASE() [5/15]

DEFINE_TESTCASE ( valueweightsource1  ,
backend   
)

◆ DEFINE_TESTCASE() [6/15]

DEFINE_TESTCASE ( valueweightsource2  ,
valuestats   
)

◆ DEFINE_TESTCASE() [7/15]

DEFINE_TESTCASE ( valueweightsource3  ,
valuestats &&!  multi 
)

◆ DEFINE_TESTCASE() [8/15]

DEFINE_TESTCASE ( fixedweightsource1  ,
backend   
)

◆ DEFINE_TESTCASE() [9/15]

DEFINE_TESTCASE ( changemaxweightsource1  ,
backend &&!remote &&!  multi 
)

◆ DEFINE_TESTCASE() [10/15]

DEFINE_TESTCASE ( emptyvalwtsource1  ,
backend &&!remote &&!  multi 
)

◆ DEFINE_TESTCASE() [11/15]

DEFINE_TESTCASE ( matchtimelimit1  ,
generated &&!  remote 
)

◆ DEFINE_TESTCASE() [12/15]

DEFINE_TESTCASE ( postingsourcebounds1  ,
backend &&!  remote 
)

◆ DEFINE_TESTCASE() [13/15]

DEFINE_TESTCASE ( postingsourceclone1  ,
backend 
)

Test cloning of initial object, which regressed in 1.3.5.

Definition at line 722 of file api_postingsource.cc.

References Xapian::PostingSource::release(), and TEST_EQUAL.

◆ DEFINE_TESTCASE() [14/15]

DEFINE_TESTCASE ( postingsourceshardindex1  ,
multi &&!  remote 
)

◆ DEFINE_TESTCASE() [15/15]

DEFINE_TESTCASE ( estimaterounding1  ,
backend &&!multi &&!  remote 
)

Check estimate is rounded to suitable number of S.F. - new in 1.4.3.

Definition at line 868 of file api_postingsource.cc.

References est(), get_database(), Xapian::MSet::get_description(), Xapian::MSet::get_matches_estimated(), Xapian::Enquire::get_mset(), Xapian::Enquire::set_query(), TEST_EQUAL, testcases, and tout.

◆ make_matchtimelimit1_db()

static void make_matchtimelimit1_db ( Xapian::WritableDatabase db,
const string &   
)
static