xapian-core  1.4.26
Classes | Functions
apitest.cc File Reference

tests the Xapian API More...

#include <config.h>
#include "apitest.h"
#include "api_all.h"
#include "backendmanager.h"
#include "stringutils.h"
#include "testrunner.h"
#include "testsuite.h"
#include <xapian.h>
#include <string>
#include <vector>
#include "api_collated.h"
+ Include dependency graph for apitest.cc:

Go to the source code of this file.

Classes

class  ApiTestRunner
 

Functions

std::string get_dbtype ()
 
Xapian::Database get_database (const string &dbname)
 
Xapian::Database get_database (const string &dbname, const string &dbname2)
 
Xapian::Database get_database (const std::string &dbname, void(*gen)(Xapian::WritableDatabase &, const std::string &), const std::string &arg)
 
string get_database_path (const string &dbname)
 
string get_database_path (const std::string &dbname, void(*gen)(Xapian::WritableDatabase &, const std::string &), const std::string &arg)
 
Xapian::WritableDatabase get_writable_database (const string &dbname)
 
Xapian::WritableDatabase get_named_writable_database (const std::string &name, const std::string &source)
 
std::string get_named_writable_database_path (const std::string &name)
 
std::string get_compaction_output_path (const std::string &name)
 
Xapian::Database get_remote_database (const string &dbname, unsigned int timeout)
 
Xapian::Database get_writable_database_as_database ()
 
Xapian::WritableDatabase get_writable_database_again ()
 
void skip_test_unless_backend (const std::string &backend_prefix)
 
void skip_test_for_backend (const std::string &backend_prefix)
 
void XFAIL_FOR_BACKEND (const std::string &backend_prefix, const char *msg)
 
int main (int argc, char **argv)
 

Detailed Description

tests the Xapian API

Definition in file apitest.cc.

Function Documentation

◆ get_compaction_output_path()

std::string get_compaction_output_path ( const std::string &  name)

Definition at line 105 of file apitest.cc.

References backendmanager, and BackendManager::get_compaction_output_path().

Referenced by DEFINE_TESTCASE().

◆ get_database() [1/3]

Xapian::Database get_database ( const string &  dbname)

Definition at line 48 of file apitest.cc.

References backendmanager, and BackendManager::get_database().

Referenced by DEFINE_TESTCASE(), and test_termlist3_helper().

◆ get_database() [2/3]

Xapian::Database get_database ( const string &  dbname,
const string &  dbname2 
)

Definition at line 54 of file apitest.cc.

References backendmanager, dbnames, and BackendManager::get_database().

◆ get_database() [3/3]

Xapian::Database get_database ( const std::string &  dbname,
void(*)(Xapian::WritableDatabase &, const std::string &)  gen,
const std::string &  arg 
)

Definition at line 63 of file apitest.cc.

References backendmanager, gen, and BackendManager::get_database().

◆ get_database_path() [1/2]

string get_database_path ( const string &  dbname)

Definition at line 72 of file apitest.cc.

References backendmanager, and BackendManager::get_database_path().

Referenced by DEFINE_TESTCASE().

◆ get_database_path() [2/2]

string get_database_path ( const std::string &  dbname,
void(*)(Xapian::WritableDatabase &, const std::string &)  gen,
const std::string &  arg 
)

Definition at line 78 of file apitest.cc.

References backendmanager, gen, and BackendManager::get_database_path().

◆ get_dbtype()

std::string get_dbtype ( )

◆ get_named_writable_database()

Xapian::WritableDatabase get_named_writable_database ( const std::string &  name,
const std::string &  source 
)

Definition at line 93 of file apitest.cc.

References backendmanager, and BackendManager::get_writable_database().

Referenced by DEFINE_TESTCASE().

◆ get_named_writable_database_path()

std::string get_named_writable_database_path ( const std::string &  name)

Definition at line 99 of file apitest.cc.

References backendmanager, and BackendManager::get_writable_database_path().

Referenced by DEFINE_TESTCASE().

◆ get_remote_database()

Xapian::Database get_remote_database ( const string &  dbname,
unsigned int  timeout 
)

Definition at line 111 of file apitest.cc.

References backendmanager, dbnames, and BackendManager::get_remote_database().

Referenced by DEFINE_TESTCASE().

◆ get_writable_database()

Xapian::WritableDatabase get_writable_database ( const string &  dbname)

◆ get_writable_database_again()

Xapian::WritableDatabase get_writable_database_again ( )

Definition at line 125 of file apitest.cc.

References backendmanager, and BackendManager::get_writable_database_again().

Referenced by DEFINE_TESTCASE().

◆ get_writable_database_as_database()

Xapian::Database get_writable_database_as_database ( )

Definition at line 119 of file apitest.cc.

References backendmanager, and BackendManager::get_writable_database_as_database().

Referenced by DEFINE_TESTCASE().

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 169 of file apitest.cc.

References TestRunner::run_tests().

◆ skip_test_for_backend()

void skip_test_for_backend ( const std::string &  backend_prefix)

Definition at line 139 of file apitest.cc.

References get_dbtype(), SKIP_TEST, and startswith().

◆ skip_test_unless_backend()

void skip_test_unless_backend ( const std::string &  backend_prefix)

Definition at line 131 of file apitest.cc.

References get_dbtype(), SKIP_TEST, and startswith().

◆ XFAIL_FOR_BACKEND()

void XFAIL_FOR_BACKEND ( const std::string &  backend_prefix,
const char *  msg 
)

Definition at line 147 of file apitest.cc.

References get_dbtype(), startswith(), and XFAIL().

Referenced by DEFINE_TESTCASE().