#include <config.h>
#include "safeerrno.h"
#include "unixcmds.h"
#include "testsuite.h"
#include "testutils.h"
#include <xapian/error.h>
#include "quartz_database.h"
#include "quartz_postlist.h"
#include "bcursor.h"
#include "quartz_utils.h"
#include "utils.h"
#include <vector>
#include <algorithm>
#include <sys/types.h>
#include "safesysstat.h"
Include dependency graph for quartztest.cc:
Go to the source code of this file.
Defines | |
#define | XAPIAN_DEPRECATED(D) D |
Functions | |
static void | makedir (const string &filename) |
static void | removedir (const string &filename) |
static bool | test_create1 () |
Test creating and opening of quartz databases. | |
static bool | test_adddoc1 () |
Test adding and deleting a document, and that flushing occurs in a sensible manner. | |
static bool | test_packint1 () |
Test packing integers into strings. | |
static bool | test_packint2 () |
Test packing integers into strings and unpacking again. | |
static bool | test_packint3 () |
Test the sort preserving packing operations. | |
static bool | test_unpackint1 () |
Test unpacking integers from strings. | |
static bool | test_writelock1 () |
Test that write locks work. | |
static bool | test_packstring1 () |
Test pack_string_preserving_sort() etc. | |
int | main (int argc, char **argv) |
Variables | |
static string | tmpdir |
test_desc | tests [] |
The lists of tests to perform. |
#define XAPIAN_DEPRECATED | ( | D | ) | D |
Definition at line 26 of file quartztest.cc.
static void makedir | ( | const string & | filename | ) | [static] |
Definition at line 50 of file quartztest.cc.
References FAIL_TEST, and mkdir().
Referenced by main().
static void removedir | ( | const string & | filename | ) | [static] |
Definition at line 58 of file quartztest.cc.
References FAIL_TEST, rm_rf(), and stat().
Referenced by main(), test_adddoc1(), test_create1(), and test_writelock1().
static bool test_create1 | ( | ) | [static] |
Test creating and opening of quartz databases.
Definition at line 69 of file quartztest.cc.
References Xapian::DB_CREATE, Xapian::DB_CREATE_OR_OVERWRITE, removedir(), TEST_EQUAL, and tmpdir.
static bool test_adddoc1 | ( | ) | [static] |
Test adding and deleting a document, and that flushing occurs in a sensible manner.
Definition at line 108 of file quartztest.cc.
References Xapian::DB_CREATE, removedir(), TEST_EQUAL, and tmpdir.
static bool test_packint1 | ( | ) | [static] |
Test packing integers into strings.
Definition at line 168 of file quartztest.cc.
References pack_uint(), and TEST_EQUAL.
static bool test_packint2 | ( | ) | [static] |
Test packing integers into strings and unpacking again.
Definition at line 181 of file quartztest.cc.
References pack_uint(), TEST, TEST_EQUAL, and unpack_uint().
static bool test_packint3 | ( | ) | [static] |
Test the sort preserving packing operations.
Definition at line 221 of file quartztest.cc.
References pack_uint_preserving_sort(), TEST, TEST_EQUAL, and unpack_uint_preserving_sort().
static bool test_unpackint1 | ( | ) | [static] |
Test unpacking integers from strings.
Definition at line 274 of file quartztest.cc.
References TEST, TEST_EQUAL, and unpack_uint().
static bool test_writelock1 | ( | ) | [static] |
Test that write locks work.
Definition at line 343 of file quartztest.cc.
References Xapian::DB_CREATE, Xapian::DB_CREATE_OR_OPEN, Xapian::DB_CREATE_OR_OVERWRITE, Xapian::DB_OPEN, Xapian::Quartz::open(), removedir(), TEST_EXCEPTION, and tmpdir.
static bool test_packstring1 | ( | ) | [static] |
Test pack_string_preserving_sort() etc.
Definition at line 360 of file quartztest.cc.
References pack_string_preserving_sort(), TEST, tout, unpack_string_preserving_sort(), and verbose.
int main | ( | int | argc, | |
char ** | argv | |||
) |
Definition at line 434 of file quartztest.cc.
References makedir(), test_driver::parse_command_line(), removedir(), test_driver::run(), tests, and tmpdir.
string tmpdir [static] |
Definition at line 48 of file quartztest.cc.
Initial value:
{ {"create1", test_create1}, {"adddoc1", test_adddoc1}, {"packint1", test_packint1}, {"packint2", test_packint2}, {"packint3", test_packint3}, {"unpackint1", test_unpackint1}, {"writelock1", test_writelock1}, {"packstring1", test_packstring1}, {0, 0} }
Definition at line 422 of file quartztest.cc.