tests/apitest.h File Reference

test functionality of the Xapian API More...

#include <xapian.h>
#include "testsuite.h"

Include dependency graph for apitest.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define DEFINE_TESTCASE(S, COND)   bool test_##S()
#define SKIP_TEST_UNLESS_BACKEND(B)   if (strcmp(get_dbtype(), (B)) != 0) SKIP_TEST("Test only supported for "#B" backend"); else (void)0
#define SKIP_TEST_FOR_BACKEND(B)   if (strcmp(get_dbtype(), (B)) == 0) SKIP_TEST("Test not supported for "#B" backend"); else (void)0

Functions

const char * get_dbtype ()
Xapian::Database get_database (const std::string &db)
Xapian::Database get_database (const std::string &db1, const std::string &db2)
Xapian::WritableDatabase get_writable_database (const std::string &db="")
Xapian::WritableDatabase get_named_writable_database (const std::string &name, const std::string &source="")
Xapian::Database get_remote_database (const std::string &db, unsigned timeout)
Xapian::Database get_writable_database_as_database ()
Xapian::WritableDatabase get_writable_database_again ()


Detailed Description

test functionality of the Xapian API

Definition in file apitest.h.


Define Documentation

#define DEFINE_TESTCASE ( S,
COND   )     bool test_##S()

Definition at line 28 of file apitest.h.

#define SKIP_TEST_UNLESS_BACKEND (  )     if (strcmp(get_dbtype(), (B)) != 0) SKIP_TEST("Test only supported for "#B" backend"); else (void)0

Definition at line 46 of file apitest.h.

Referenced by DEFINE_TESTCASE().

#define SKIP_TEST_FOR_BACKEND (  )     if (strcmp(get_dbtype(), (B)) == 0) SKIP_TEST("Test not supported for "#B" backend"); else (void)0

Definition at line 49 of file apitest.h.

Referenced by DEFINE_TESTCASE().


Function Documentation

const char* get_dbtype (  ) 

Definition at line 50 of file apitest.cc.

References backendmanager, and BackendManager::get_dbtype().

Referenced by DEFINE_TESTCASE().

Xapian::Database get_database ( const std::string &  db  ) 

Xapian::Database get_database ( const std::string &  db1,
const std::string &  db2 
)

Xapian::WritableDatabase get_writable_database ( const std::string &  db = ""  ) 

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

Definition at line 77 of file apitest.cc.

References backendmanager, and BackendManager::get_writable_database().

Referenced by DEFINE_TESTCASE().

Xapian::Database get_remote_database ( const std::string &  db,
unsigned  timeout 
)

Xapian::Database get_writable_database_as_database (  ) 

Definition at line 91 of file apitest.cc.

References backendmanager, and BackendManager::get_writable_database_as_database().

Referenced by DEFINE_TESTCASE().

Xapian::WritableDatabase get_writable_database_again (  ) 

Definition at line 97 of file apitest.cc.

References backendmanager, and BackendManager::get_writable_database_again().

Referenced by DEFINE_TESTCASE().


Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.