tests/internaltest.cc File Reference

#include <config.h>
#include <xapian.h>
#include <cfloat>
#include "safeerrno.h"
#include <iostream>
#include <string>
#include "autoptr.h"
#include "testsuite.h"
#include "testutils.h"
#include "omassert.h"
#include "omqueryinternal.h"
#include "pack.h"
#include "serialise.h"
#include "serialise-double.h"
#include "str.h"

Include dependency graph for internaltest.cc:

Go to the source code of this file.

Classes

class  Test_Exception
class  test_refcnt
class  test_autoptr
struct  TempDtorTest

Functions

static bool test_except1 ()
static bool test_exception1 ()
static bool test_refcnt1 ()
static bool test_refcnt2 ()
static bool test_autoptr1 ()
static bool test_stringcomp1 ()
static bool test_tostring1 ()
static bool test_serialiselength1 ()
static bool test_serialiselength2 ()
static void check_double_serialisation (double u)
static bool test_serialisedouble1 ()
static bool test_serialisedoc1 ()
static void serialisequery1_helper (const Xapian::Query &query)
static bool test_serialisequery1 ()
static bool test_serialiseerror1 ()
static bool test_temporarydtor1 ()
static bool test_static_assert1 ()
static bool test_strbool1 ()
 Regression test for bug fixed in 1.1.1.
static bool test_pack_uint_preserving_sort1 ()
 Test pack_uint_preserving_sort().
int main (int argc, char **argv)

Variables

static const test_desc tests []
 The lists of tests to perform.


Function Documentation

static void check_double_serialisation ( double  u  )  [static]

Definition at line 354 of file internaltest.cc.

References serialise_double(), TEST, TEST_EQUAL, tout, and unserialise_double().

Referenced by test_serialisedouble1().

int main ( int  argc,
char **  argv 
)

Definition at line 633 of file internaltest.cc.

References test_driver::parse_command_line(), and test_driver::run().

static void serialisequery1_helper ( const Xapian::Query query  )  [static]

static bool test_autoptr1 (  )  [static]

Definition at line 163 of file internaltest.cc.

References TEST, and TEST_EQUAL.

static bool test_except1 (  )  [static]

Definition at line 47 of file internaltest.cc.

static bool test_exception1 (  )  [static]

Definition at line 63 of file internaltest.cc.

References TEST_EQUAL, and Test_Exception::value.

static bool test_pack_uint_preserving_sort1 (  )  [static]

static bool test_refcnt1 (  )  [static]

static bool test_refcnt2 (  )  [static]

Definition at line 134 of file internaltest.cc.

References TEST_AND_EXPLAIN.

static bool test_serialisedoc1 (  )  [static]

static bool test_serialisedouble1 (  )  [static]

Definition at line 370 of file internaltest.cc.

References check_double_serialisation().

static bool test_serialiseerror1 (  )  [static]

static bool test_serialiselength1 (  )  [static]

Definition at line 256 of file internaltest.cc.

References decode_length(), encode_length(), TEST_EQUAL, and tout.

static bool test_serialiselength2 (  )  [static]

Definition at line 278 of file internaltest.cc.

References decode_length(), encode_length(), TEST, TEST_EQUAL, and TEST_EXCEPTION.

static bool test_serialisequery1 (  )  [static]

static bool test_static_assert1 (  )  [static]

static bool test_strbool1 (  )  [static]

Regression test for bug fixed in 1.1.1.

Definition at line 579 of file internaltest.cc.

References Xapian::Internal::str(), and TEST_EQUAL.

static bool test_stringcomp1 (  )  [static]

Definition at line 188 of file internaltest.cc.

References tout.

static bool test_temporarydtor1 (  )  [static]

Definition at line 519 of file internaltest.cc.

References TempDtorTest::count, TempDtorTest::factory(), and TEST_EQUAL.

static bool test_tostring1 (  )  [static]

Definition at line 228 of file internaltest.cc.

References Xapian::Internal::str(), and TEST_EQUAL.


Variable Documentation

const test_desc tests[] [static]

Initial value:

 {
    {"except1",                 test_except1},
    {"exception1",              test_exception1},
    {"refcnt1",                 test_refcnt1},
    {"refcnt2",                 test_refcnt2},
    {"autoptr1",                test_autoptr1},
    {"stringcomp1",             test_stringcomp1},
    {"temporarydtor1",          test_temporarydtor1},
    {"tostring1",               test_tostring1},
    {"serialisedouble1",        test_serialisedouble1},

    {"serialiselength1",        test_serialiselength1},
    {"serialiselength2",        test_serialiselength2},
    {"serialisedoc1",           test_serialisedoc1},
    {"serialisequery1",         test_serialisequery1},
    {"serialiseerror1",         test_serialiseerror1},

    {"static_assert1",          test_static_assert1},
    {"strbool1",                test_strbool1},
    {"pack1",                   test_pack_uint_preserving_sort1},
    {0, 0}
}
The lists of tests to perform.

Definition at line 610 of file internaltest.cc.

Referenced by if().


Documentation for Xapian (version 1.2.8).
Generated on 14 Dec 2011 by Doxygen 1.5.9.