xapian-core
1.4.27
|
Test the user metadata functionality. More...
#include <config.h>
#include "api_metadata.h"
#include <xapian.h>
#include "apitest.h"
#include "testsuite.h"
#include "testutils.h"
#include <string>
Go to the source code of this file.
Functions | |
DEFINE_TESTCASE (metadata1, metadata) | |
DEFINE_TESTCASE (metadata2, metadata &&writable) | |
DEFINE_TESTCASE (metadata3, metadata &&writable &&!inmemory) | |
DEFINE_TESTCASE (metadata4, metadata &&writable) | |
DEFINE_TESTCASE (metadata5, metadata &&writable &&!inmemory) | |
DEFINE_TESTCASE (metadata6, writable) | |
DEFINE_TESTCASE (writeread1, metadata &&writable) | |
Regression test of reading after writing but not committing. More... | |
Test the user metadata functionality.
Definition in file api_metadata.cc.
DEFINE_TESTCASE | ( | metadata1 | , |
metadata | |||
) |
Definition at line 37 of file api_metadata.cc.
References get_database(), Xapian::Database::get_doccount(), Xapian::Database::get_metadata(), Xapian::WritableDatabase::set_metadata(), TEST_EQUAL, and TEST_EXCEPTION.
DEFINE_TESTCASE | ( | metadata2 | , |
metadata && | writable | ||
) |
Definition at line 68 of file api_metadata.cc.
References Xapian::WritableDatabase::commit(), Xapian::Database::get_doccount(), Xapian::Database::get_metadata(), get_writable_database(), Xapian::WritableDatabase::set_metadata(), and TEST_EQUAL.
DEFINE_TESTCASE | ( | metadata3 | , |
metadata &&writable &&! | inmemory | ||
) |
Definition at line 99 of file api_metadata.cc.
References Xapian::WritableDatabase::add_document(), Xapian::WritableDatabase::commit(), Xapian::Database::get_doccount(), Xapian::Database::get_metadata(), get_writable_database(), get_writable_database_as_database(), Xapian::Database::reopen(), Xapian::WritableDatabase::set_metadata(), TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | metadata4 | , |
metadata && | writable | ||
) |
Definition at line 136 of file api_metadata.cc.
References Xapian::Database::get_metadata(), get_writable_database(), Xapian::WritableDatabase::set_metadata(), and TEST_EXCEPTION.
DEFINE_TESTCASE | ( | metadata5 | , |
metadata &&writable &&! | inmemory | ||
) |
Definition at line 146 of file api_metadata.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_posting(), Xapian::WritableDatabase::commit(), get_writable_database(), get_writable_database_as_database(), and Xapian::WritableDatabase::set_metadata().
DEFINE_TESTCASE | ( | metadata6 | , |
writable | |||
) |
Definition at line 161 of file api_metadata.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_posting(), Xapian::WritableDatabase::commit(), get_writable_database(), Xapian::Database::metadata_keys_begin(), Xapian::Database::metadata_keys_end(), Xapian::WritableDatabase::set_metadata(), SKIP_TEST, SKIP_TEST_FOR_BACKEND, TEST, TEST_EQUAL, and TEST_REL.
DEFINE_TESTCASE | ( | writeread1 | , |
metadata && | writable | ||
) |
Regression test of reading after writing but not committing.
Definition at line 290 of file api_metadata.cc.
References Xapian::Database::get_metadata(), get_writable_database(), Xapian::WritableDatabase::set_metadata(), and TEST_EQUAL.