xapian-core
1.4.27
|
Tests of old compaction API. More...
#include <config.h>
#include "api_compactold.h"
#include <xapian.h>
#include "apitest.h"
#include "dbcheck.h"
#include "filetests.h"
#include "str.h"
#include "testsuite.h"
#include "testutils.h"
#include <cstdlib>
#include <fstream>
#include "unixcmds.h"
Go to the source code of this file.
Macros | |
#define | XAPIAN_DEPRECATED(X) X |
Functions | |
static void | make_sparse_db (Xapian::WritableDatabase &db, const string &s) |
static void | check_sparse_uid_terms (const string &path) |
DEFINE_TESTCASE (compactoldnorenumber1, compact &&!multi) | |
DEFINE_TESTCASE (compactoldmerge1, compact) | |
static void | make_multichunk_db (Xapian::WritableDatabase &db, const string &) |
DEFINE_TESTCASE (compactoldmultichunks1, compact) | |
DEFINE_TESTCASE (compactoldstub1, compact) | |
DEFINE_TESTCASE (compactoldstub2, compact) | |
DEFINE_TESTCASE (compactoldstub3, compact) | |
DEFINE_TESTCASE (compactoldstub4, compact) | |
static void | make_all_tables (Xapian::WritableDatabase &db, const string &) |
static void | make_missing_tables (Xapian::WritableDatabase &db, const string &) |
DEFINE_TESTCASE (compactoldmissingtables1, compact) | |
static void | make_all_tables2 (Xapian::WritableDatabase &db, const string &) |
DEFINE_TESTCASE (compactoldmergesynonym1, compact) | |
Adds coverage for merging synonym table. More... | |
DEFINE_TESTCASE (compactoldempty1, compact) | |
DEFINE_TESTCASE (compactoldmultipass1, compact) | |
Tests of old compaction API.
Definition in file api_compactold.cc.
#define XAPIAN_DEPRECATED | ( | X | ) | X |
Definition at line 27 of file api_compactold.cc.
|
static |
Definition at line 87 of file api_compactold.cc.
References Xapian::Database::allterms_begin(), Xapian::Database::allterms_end(), Xapian::Database::postlist_begin(), and TEST_EQUAL.
Referenced by DEFINE_TESTCASE().
DEFINE_TESTCASE | ( | compactoldnorenumber1 | , |
compact &&! | multi | ||
) |
Definition at line 99 of file api_compactold.cc.
References Xapian::Compactor::add_source(), check_sparse_uid_terms(), Xapian::Compactor::compact(), dbcheck(), dir_exists(), get_compaction_output_path(), get_database_path(), Xapian::Database::get_uuid(), make_sparse_db(), rm_rf(), Xapian::Compactor::set_destdir(), Xapian::Compactor::set_renumber(), TEST, TEST_EQUAL, TEST_EXCEPTION, and TEST_NOT_EQUAL.
DEFINE_TESTCASE | ( | compactoldmerge1 | , |
compact | |||
) |
Definition at line 243 of file api_compactold.cc.
References Xapian::Compactor::add_source(), Xapian::Compactor::compact(), dbcheck(), get_compaction_output_path(), get_database(), get_database_path(), Xapian::Database::get_doccount(), rm_rf(), Xapian::Compactor::set_destdir(), and TEST_EQUAL.
DEFINE_TESTCASE | ( | compactoldmultichunks1 | , |
compact | |||
) |
Definition at line 278 of file api_compactold.cc.
References Xapian::Compactor::add_source(), Xapian::Compactor::compact(), dbcheck(), get_compaction_output_path(), get_database_path(), Xapian::Database::get_doccount(), make_multichunk_db(), rm_rf(), Xapian::Compactor::set_destdir(), and TEST_EQUAL.
DEFINE_TESTCASE | ( | compactoldstub1 | , |
compact | |||
) |
Definition at line 297 of file api_compactold.cc.
References Xapian::Compactor::add_source(), Xapian::Compactor::compact(), dbcheck(), get_compaction_output_path(), get_database_path(), Xapian::Database::get_doccount(), rm_rf(), Xapian::Compactor::set_destdir(), TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | compactoldstub2 | , |
compact | |||
) |
Definition at line 324 of file api_compactold.cc.
References Xapian::Compactor::add_source(), Xapian::Compactor::compact(), dbcheck(), get_compaction_output_path(), get_database_path(), Xapian::Database::get_doccount(), rm_rf(), Xapian::Compactor::set_destdir(), TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | compactoldstub3 | , |
compact | |||
) |
Definition at line 349 of file api_compactold.cc.
References Xapian::Compactor::add_source(), Xapian::Compactor::compact(), dbcheck(), get_database_path(), Xapian::Database::get_doccount(), Xapian::Compactor::set_destdir(), TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | compactoldstub4 | , |
compact | |||
) |
Definition at line 376 of file api_compactold.cc.
References Xapian::Compactor::add_source(), Xapian::Compactor::compact(), dbcheck(), get_database_path(), Xapian::Database::get_doccount(), Xapian::Compactor::set_destdir(), TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | compactoldmissingtables1 | , |
compact | |||
) |
Definition at line 427 of file api_compactold.cc.
References Xapian::Compactor::add_source(), Xapian::Compactor::compact(), get_compaction_output_path(), get_database_path(), make_all_tables(), make_missing_tables(), rm_rf(), Xapian::Compactor::set_destdir(), Xapian::Database::spellings_begin(), Xapian::Database::spellings_end(), Xapian::Database::synonym_keys_begin(), Xapian::Database::synonym_keys_end(), and TEST_NOT_EQUAL.
DEFINE_TESTCASE | ( | compactoldmergesynonym1 | , |
compact | |||
) |
Adds coverage for merging synonym table.
Definition at line 466 of file api_compactold.cc.
References Xapian::Compactor::add_source(), Xapian::Compactor::compact(), get_compaction_output_path(), get_database_path(), make_all_tables(), make_all_tables2(), rm_rf(), Xapian::Compactor::set_destdir(), Xapian::Database::spellings_begin(), Xapian::Database::spellings_end(), Xapian::Database::synonym_keys_begin(), Xapian::Database::synonym_keys_end(), TEST_EQUAL, and TEST_NOT_EQUAL.
DEFINE_TESTCASE | ( | compactoldempty1 | , |
compact | |||
) |
Definition at line 510 of file api_compactold.cc.
References Xapian::Compactor::add_source(), Xapian::Compactor::compact(), dbcheck(), get_compaction_output_path(), get_database_path(), Xapian::Database::get_doccount(), rm_rf(), Xapian::Compactor::set_destdir(), and TEST_EQUAL.
DEFINE_TESTCASE | ( | compactoldmultipass1 | , |
compact | |||
) |
Definition at line 541 of file api_compactold.cc.
References Xapian::Compactor::add_source(), Xapian::Compactor::compact(), dbcheck(), get_compaction_output_path(), get_database_path(), make_sparse_db(), rm_rf(), Xapian::Compactor::set_destdir(), and Xapian::Compactor::set_multipass().
|
static |
Definition at line 405 of file api_compactold.cc.
References Xapian::WritableDatabase::add_document(), Xapian::WritableDatabase::add_spelling(), Xapian::WritableDatabase::add_synonym(), Xapian::Document::add_term(), and Xapian::WritableDatabase::commit().
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 452 of file api_compactold.cc.
References Xapian::WritableDatabase::add_document(), Xapian::WritableDatabase::add_spelling(), Xapian::WritableDatabase::add_synonym(), Xapian::Document::add_term(), and Xapian::WritableDatabase::commit().
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 418 of file api_compactold.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_term(), and Xapian::WritableDatabase::commit().
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 262 of file api_compactold.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_term(), and Xapian::WritableDatabase::commit().
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 45 of file api_compactold.cc.
References Xapian::Document::add_term(), Xapian::WritableDatabase::commit(), Xapian::WritableDatabase::delete_document(), FAIL_TEST, Xapian::WritableDatabase::replace_document(), Xapian::Document::set_data(), Xapian::Internal::str(), and tout.
Referenced by DEFINE_TESTCASE().