tests/api_transdb.cc File Reference

tests requiring a database backend supporting transactions More...

#include <config.h>
#include <xapian.h>
#include "apitest.h"
#include "testutils.h"

Include dependency graph for api_transdb.cc:

Go to the source code of this file.

Functions

 DEFINE_TESTCASE (badtransaction1, transactions)
 Test incorrect uses of the transaction API lead to errors.
 DEFINE_TESTCASE (committransaction1, transactions)
 Test committing a simple transaction.
 DEFINE_TESTCASE (canceltransaction1, transactions)
 Test cancelling a simple transaction.
 DEFINE_TESTCASE (canceltransaction2, transactions)
 Test that begin_transaction() flushes any changes pending before the.


Detailed Description

tests requiring a database backend supporting transactions

Definition in file api_transdb.cc.


Function Documentation

DEFINE_TESTCASE ( badtransaction1  ,
transactions   
)

Test incorrect uses of the transaction API lead to errors.

Definition at line 31 of file api_transdb.cc.

References Xapian::WritableDatabase::begin_transaction(), Xapian::WritableDatabase::cancel_transaction(), Xapian::WritableDatabase::commit_transaction(), get_writable_database(), and TEST_EXCEPTION.

DEFINE_TESTCASE ( committransaction1  ,
transactions   
)

Test committing a simple transaction.

Definition at line 61 of file api_transdb.cc.

References Xapian::WritableDatabase::add_document(), Xapian::Document::add_term(), Xapian::WritableDatabase::begin_transaction(), Xapian::WritableDatabase::commit_transaction(), Xapian::Database::get_doccount(), Xapian::Database::get_termfreq(), get_writable_database(), Xapian::Document::set_data(), TEST_EQUAL, and TEST_EXCEPTION.

DEFINE_TESTCASE ( canceltransaction1  ,
transactions   
)

Test cancelling a simple transaction.

Definition at line 81 of file api_transdb.cc.

References Xapian::WritableDatabase::add_document(), Xapian::Document::add_term(), Xapian::WritableDatabase::begin_transaction(), Xapian::WritableDatabase::cancel_transaction(), Xapian::Database::get_doccount(), Xapian::Database::get_termfreq(), get_writable_database(), Xapian::Document::set_data(), TEST_EQUAL, and TEST_EXCEPTION.

DEFINE_TESTCASE ( canceltransaction2  ,
transactions   
)

Test that begin_transaction() flushes any changes pending before the.

Definition at line 102 of file api_transdb.cc.

References Xapian::WritableDatabase::add_document(), Xapian::Document::add_term(), Xapian::WritableDatabase::begin_transaction(), Xapian::WritableDatabase::cancel_transaction(), Xapian::Database::get_doccount(), Xapian::Database::get_document(), get_writable_database(), Xapian::Document::set_data(), Xapian::Database::term_exists(), TEST, and TEST_EQUAL.


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