xapian-core  1.4.27
Classes | Macros | Functions
api_db.cc File Reference

tests which need a backend More...

#include <config.h>
#include "api_db.h"
#include <algorithm>
#include <fstream>
#include <map>
#include <string>
#include <vector>
#include "safenetdb.h"
#include "safesysstat.h"
#include "safeunistd.h"
#include <xapian.h>
#include "backendmanager.h"
#include "testsuite.h"
#include "testutils.h"
#include "unixcmds.h"
#include "apitest.h"
+ Include dependency graph for api_db.cc:

Go to the source code of this file.

Classes

class  GrepMatchDecider
 
class  MyWeight
 

Macros

#define EXPECTED_EXCEPTION   Xapian::DatabaseOpeningError
 

Functions

static Xapian::Query query (const string &t)
 
 DEFINE_TESTCASE (termstats, backend)
 
 DEFINE_TESTCASE (stubdb1, check &&path)
 
 DEFINE_TESTCASE (stubdb2, path)
 
 DEFINE_TESTCASE (stubdb3, path)
 
 DEFINE_TESTCASE (stubdb4, !backend)
 
 DEFINE_TESTCASE (stubdb5, path)
 
 DEFINE_TESTCASE (stubdb6, inmemory)
 
 DEFINE_TESTCASE (stubdb8, inmemory)
 Test error running Database::check() on a stub database. More...
 
 DEFINE_TESTCASE (matchdecider1, backend &&!remote)
 
 DEFINE_TESTCASE (matchdecider2, backend &&!remote)
 
 DEFINE_TESTCASE (matchdecider3, backend &&!remote)
 
 DEFINE_TESTCASE (msetiterator1, backend)
 
 DEFINE_TESTCASE (msetiterator2, backend)
 
 DEFINE_TESTCASE (msetiterator3, backend)
 
 DEFINE_TESTCASE (esetiterator1, backend)
 
 DEFINE_TESTCASE (esetiterator2, backend)
 
 DEFINE_TESTCASE (collapsekey1, backend)
 
 DEFINE_TESTCASE (collapsekey2, backend)
 
 DEFINE_TESTCASE (collapsekey3, backend)
 
 DEFINE_TESTCASE (collapsekey4, backend)
 
 DEFINE_TESTCASE (keepalive1, remote)
 
 DEFINE_TESTCASE (allterms1, backend)
 
 DEFINE_TESTCASE (allterms2, backend)
 
 DEFINE_TESTCASE (allterms3, backend)
 
 DEFINE_TESTCASE (allterms4, backend)
 
 DEFINE_TESTCASE (allterms5, backend)
 
 DEFINE_TESTCASE (allterms6, backend)
 
 DEFINE_TESTCASE (specialterms1, backend)
 
 DEFINE_TESTCASE (specialterms2, backend)
 
 DEFINE_TESTCASE (rsetmultidb2, backend &&!multi)
 
 DEFINE_TESTCASE (multiexpand1, backend &&!multi)
 
 DEFINE_TESTCASE (postlist1, backend)
 
 DEFINE_TESTCASE (postlist2, backend)
 
 DEFINE_TESTCASE (postlist3, backend)
 
 DEFINE_TESTCASE (postlist4, backend)
 
 DEFINE_TESTCASE (postlist5, backend)
 
 DEFINE_TESTCASE (postlist6, backend)
 
 DEFINE_TESTCASE (collfreq1, backend)
 
 DEFINE_TESTCASE (sortvalue1, backend)
 
 DEFINE_TESTCASE (consistency1, backend &&!remote)
 
 DEFINE_TESTCASE (chertdatabasenotfounderror1, chert)
 
 DEFINE_TESTCASE (glassdatabasenotfounderror1, glass)
 
 DEFINE_TESTCASE (databasenotfounderror2, !backend)
 
 DEFINE_TESTCASE (chertdatabaseopen1, chert)
 Test opening of a chert database. More...
 
 DEFINE_TESTCASE (sortrel1, backend)
 
static void make_netstats1_db (Xapian::WritableDatabase &db, const string &)
 
 DEFINE_TESTCASE (netstats1, backend)
 
 DEFINE_TESTCASE (userweight1, backend &&!remote)
 
 DEFINE_TESTCASE (matchall1, backend)
 
 DEFINE_TESTCASE (valuesetmatchdecider2, backend &&!remote)
 

Detailed Description

tests which need a backend

Definition in file api_db.cc.

Macro Definition Documentation

◆ EXPECTED_EXCEPTION

#define EXPECTED_EXCEPTION   Xapian::DatabaseOpeningError

Referenced by DEFINE_TESTCASE().

Function Documentation

◆ DEFINE_TESTCASE() [1/49]

DEFINE_TESTCASE ( termstats  ,
backend   
)

◆ DEFINE_TESTCASE() [2/49]

DEFINE_TESTCASE ( stubdb1  ,
check &&  path 
)

◆ DEFINE_TESTCASE() [3/49]

DEFINE_TESTCASE ( stubdb2  ,
path   
)

◆ DEFINE_TESTCASE() [4/49]

DEFINE_TESTCASE ( stubdb3  ,
path   
)

Definition at line 223 of file api_db.cc.

References Xapian::DB_BACKEND_STUB, get_database_path(), TEST, and TEST_EXCEPTION.

◆ DEFINE_TESTCASE() [5/49]

DEFINE_TESTCASE ( stubdb4  ,
backend 
)

Definition at line 240 of file api_db.cc.

References Xapian::DB_BACKEND_STUB, TEST, and TEST_EXCEPTION.

◆ DEFINE_TESTCASE() [6/49]

DEFINE_TESTCASE ( stubdb5  ,
path   
)

Definition at line 257 of file api_db.cc.

References Xapian::DB_BACKEND_STUB, get_database_path(), TEST, and TEST_EXCEPTION.

◆ DEFINE_TESTCASE() [7/49]

DEFINE_TESTCASE ( stubdb6  ,
inmemory   
)

◆ DEFINE_TESTCASE() [8/49]

DEFINE_TESTCASE ( stubdb8  ,
inmemory   
)

◆ DEFINE_TESTCASE() [9/49]

DEFINE_TESTCASE ( matchdecider1  ,
backend &&!  remote 
)

◆ DEFINE_TESTCASE() [10/49]

DEFINE_TESTCASE ( matchdecider2  ,
backend &&!  remote 
)

◆ DEFINE_TESTCASE() [11/49]

DEFINE_TESTCASE ( matchdecider3  ,
backend &&!  remote 
)

◆ DEFINE_TESTCASE() [12/49]

DEFINE_TESTCASE ( msetiterator1  ,
backend   
)

◆ DEFINE_TESTCASE() [13/49]

DEFINE_TESTCASE ( msetiterator2  ,
backend   
)

◆ DEFINE_TESTCASE() [14/49]

DEFINE_TESTCASE ( msetiterator3  ,
backend   
)

◆ DEFINE_TESTCASE() [15/49]

DEFINE_TESTCASE ( esetiterator1  ,
backend   
)

◆ DEFINE_TESTCASE() [16/49]

DEFINE_TESTCASE ( esetiterator2  ,
backend   
)

◆ DEFINE_TESTCASE() [17/49]

DEFINE_TESTCASE ( collapsekey1  ,
backend   
)

◆ DEFINE_TESTCASE() [18/49]

DEFINE_TESTCASE ( collapsekey2  ,
backend   
)

◆ DEFINE_TESTCASE() [19/49]

DEFINE_TESTCASE ( collapsekey3  ,
backend   
)

◆ DEFINE_TESTCASE() [20/49]

DEFINE_TESTCASE ( collapsekey4  ,
backend   
)

◆ DEFINE_TESTCASE() [21/49]

DEFINE_TESTCASE ( keepalive1  ,
remote   
)

◆ DEFINE_TESTCASE() [22/49]

DEFINE_TESTCASE ( allterms1  ,
backend   
)

◆ DEFINE_TESTCASE() [23/49]

DEFINE_TESTCASE ( allterms2  ,
backend   
)

◆ DEFINE_TESTCASE() [24/49]

DEFINE_TESTCASE ( allterms3  ,
backend   
)

◆ DEFINE_TESTCASE() [25/49]

DEFINE_TESTCASE ( allterms4  ,
backend   
)

◆ DEFINE_TESTCASE() [26/49]

DEFINE_TESTCASE ( allterms5  ,
backend   
)

◆ DEFINE_TESTCASE() [27/49]

DEFINE_TESTCASE ( allterms6  ,
backend   
)

◆ DEFINE_TESTCASE() [28/49]

DEFINE_TESTCASE ( specialterms1  ,
backend   
)

◆ DEFINE_TESTCASE() [29/49]

DEFINE_TESTCASE ( specialterms2  ,
backend   
)

◆ DEFINE_TESTCASE() [30/49]

DEFINE_TESTCASE ( rsetmultidb2  ,
backend &&!  multi 
)

◆ DEFINE_TESTCASE() [31/49]

DEFINE_TESTCASE ( multiexpand1  ,
backend &&!  multi 
)

◆ DEFINE_TESTCASE() [32/49]

DEFINE_TESTCASE ( postlist1  ,
backend   
)

◆ DEFINE_TESTCASE() [33/49]

DEFINE_TESTCASE ( postlist2  ,
backend   
)

◆ DEFINE_TESTCASE() [34/49]

DEFINE_TESTCASE ( postlist3  ,
backend   
)

◆ DEFINE_TESTCASE() [35/49]

DEFINE_TESTCASE ( postlist4  ,
backend   
)

◆ DEFINE_TESTCASE() [36/49]

DEFINE_TESTCASE ( postlist5  ,
backend   
)

◆ DEFINE_TESTCASE() [37/49]

DEFINE_TESTCASE ( postlist6  ,
backend   
)

◆ DEFINE_TESTCASE() [38/49]

DEFINE_TESTCASE ( collfreq1  ,
backend   
)

◆ DEFINE_TESTCASE() [39/49]

DEFINE_TESTCASE ( sortvalue1  ,
backend   
)

◆ DEFINE_TESTCASE() [40/49]

DEFINE_TESTCASE ( consistency1  ,
backend &&!  remote 
)

◆ DEFINE_TESTCASE() [41/49]

DEFINE_TESTCASE ( chertdatabasenotfounderror1  ,
chert   
)

◆ DEFINE_TESTCASE() [42/49]

DEFINE_TESTCASE ( glassdatabasenotfounderror1  ,
glass   
)

◆ DEFINE_TESTCASE() [43/49]

DEFINE_TESTCASE ( databasenotfounderror2  ,
backend 
)

Definition at line 1590 of file api_db.cc.

References Xapian::DB_OPEN, and TEST_EXCEPTION.

◆ DEFINE_TESTCASE() [44/49]

DEFINE_TESTCASE ( chertdatabaseopen1  ,
chert   
)

◆ DEFINE_TESTCASE() [45/49]

DEFINE_TESTCASE ( sortrel1  ,
backend   
)

◆ DEFINE_TESTCASE() [46/49]

DEFINE_TESTCASE ( netstats1  ,
backend   
)

◆ DEFINE_TESTCASE() [47/49]

DEFINE_TESTCASE ( userweight1  ,
backend &&!  remote 
)

◆ DEFINE_TESTCASE() [48/49]

DEFINE_TESTCASE ( matchall1  ,
backend   
)

◆ DEFINE_TESTCASE() [49/49]

DEFINE_TESTCASE ( valuesetmatchdecider2  ,
backend &&!  remote 
)

◆ make_netstats1_db()

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

◆ query()

static Xapian::Query query ( const string &  t)
static

Definition at line 50 of file api_db.cc.

Referenced by DEFINE_TESTCASE().