tests/api_nodb.cc File Reference

#include <config.h>
#include "api_nodb.h"
#include <string>
#include <vector>
#include "autoptr.h"
#include <xapian.h>
#include "apitest.h"
#include "testsuite.h"
#include "testutils.h"
#include "utils.h"
#include <list>

Include dependency graph for api_nodb.cc:

Go to the source code of this file.

Functions

 DEFINE_TESTCASE (trivial1,!backend)
 DEFINE_TESTCASE (getqterms1,!backend)
 DEFINE_TESTCASE (getqterms2,!backend)
 DEFINE_TESTCASE (emptyquery2,!backend)
 DEFINE_TESTCASE (emptyquery3,!backend)
 Regression test for behaviour for an empty query with AND_NOT.
 DEFINE_TESTCASE (querylen1,!backend)
 DEFINE_TESTCASE (querylen2,!backend)
 DEFINE_TESTCASE (queryvalid1,!backend)
 DEFINE_TESTCASE (subqcollapse1,!backend)
 DEFINE_TESTCASE (emptyquerypart1,!backend)
 DEFINE_TESTCASE (singlesubq1,!backend)
 DEFINE_TESTCASE (stemlangs1,!backend)
 DEFINE_TESTCASE (weight1,!backend)
 DEFINE_TESTCASE (nosuchdb1,!backend)
 DEFINE_TESTCASE (addvalue1,!backend)
 DEFINE_TESTCASE (poscollapse2,!backend)
 DEFINE_TESTCASE (uninitdb1,!backend)
 DEFINE_TESTCASE (scaleweight3,!backend)
 DEFINE_TESTCASE (scaleweight4,!backend)
 DEFINE_TESTCASE (rset4,!backend)
 DEFINE_TESTCASE (opvaluege1,!backend)
 DEFINE_TESTCASE (nearsubqueries1,!backend)
 Regression test - this threw AssertionError in 1.0.9 and earlier (bug#201).


Function Documentation

DEFINE_TESTCASE ( trivial1  ,
backend 
)

Definition at line 44 of file api_nodb.cc.

DEFINE_TESTCASE ( getqterms1  ,
backend 
)

Definition at line 49 of file api_nodb.cc.

References Xapian::Query::get_terms_begin(), Xapian::Query::get_terms_end(), Xapian::Query::OP_AND, Xapian::Query::OP_OR, and TEST.

DEFINE_TESTCASE ( getqterms2  ,
backend 
)

Definition at line 78 of file api_nodb.cc.

References Xapian::Query::get_terms_begin(), Xapian::Query::get_terms_end(), and TEST_EQUAL.

DEFINE_TESTCASE ( emptyquery2  ,
backend 
)

Definition at line 85 of file api_nodb.cc.

References Xapian::Query::OP_OR, and TEST.

DEFINE_TESTCASE ( emptyquery3  ,
backend 
)

Regression test for behaviour for an empty query with AND_NOT.

Definition at line 97 of file api_nodb.cc.

References Xapian::Query::get_description(), Xapian::Query::OP_AND, Xapian::Query::OP_AND_MAYBE, Xapian::Query::OP_AND_NOT, Xapian::Query::OP_OR, Xapian::Query::OP_XOR, and tout.

DEFINE_TESTCASE ( querylen1  ,
backend 
)

Definition at line 120 of file api_nodb.cc.

References Xapian::Query::empty(), Xapian::Query::get_length(), Xapian::Query::OP_AND, Xapian::Query::OP_OR, TEST, and TEST_EQUAL.

DEFINE_TESTCASE ( querylen2  ,
backend 
)

Definition at line 138 of file api_nodb.cc.

References AutoPtr< _Tp >::get(), Xapian::Query::OP_AND, Xapian::Query::OP_OR, TEST_EQUAL, and tout.

DEFINE_TESTCASE ( queryvalid1  ,
backend 
)

Definition at line 186 of file api_nodb.cc.

References Xapian::Query::OP_AND_NOT, Xapian::Query::OP_XOR, TEST_EXCEPTION, and tout.

DEFINE_TESTCASE ( subqcollapse1  ,
backend 
)

Definition at line 207 of file api_nodb.cc.

References Xapian::Query::OP_AND, Xapian::Query::OP_OR, and TEST_EQUAL.

DEFINE_TESTCASE ( emptyquerypart1  ,
backend 
)

Definition at line 234 of file api_nodb.cc.

References Xapian::Query::OP_AND, Xapian::Query::OP_OR, query(), and TEST.

DEFINE_TESTCASE ( singlesubq1  ,
backend 
)

Definition at line 244 of file api_nodb.cc.

References Xapian::Query::OP_ELITE_SET, Xapian::Query::OP_NEAR, and Xapian::Query::OP_PHRASE.

DEFINE_TESTCASE ( stemlangs1  ,
backend 
)

Definition at line 253 of file api_nodb.cc.

References Xapian::Stem::get_available_languages(), language, stemmer, TEST, TEST_EXCEPTION, TEST_NOT_EQUAL, and tout.

DEFINE_TESTCASE ( weight1  ,
backend 
)

Definition at line 288 of file api_nodb.cc.

References Xapian::BM25Weight::name(), Xapian::TradWeight::name(), Xapian::BoolWeight::name(), Xapian::BM25Weight::serialise(), Xapian::TradWeight::serialise(), Xapian::BoolWeight::serialise(), TEST_EQUAL, TEST_NOT_EQUAL, and Xapian::Weight::unserialise().

DEFINE_TESTCASE ( nosuchdb1  ,
backend 
)

Definition at line 323 of file api_nodb.cc.

References TEST_EXCEPTION.

DEFINE_TESTCASE ( addvalue1  ,
backend 
)

Definition at line 331 of file api_nodb.cc.

References Xapian::Document::add_value(), Xapian::Document::get_value(), Xapian::Document::remove_value(), and TEST_EQUAL.

DEFINE_TESTCASE ( poscollapse2  ,
backend 
)

Definition at line 354 of file api_nodb.cc.

References Xapian::Query::get_length(), Xapian::Query::OP_OR, and TEST_EQUAL.

DEFINE_TESTCASE ( uninitdb1  ,
backend 
)

Definition at line 362 of file api_nodb.cc.

References TEST_EXCEPTION.

DEFINE_TESTCASE ( scaleweight3  ,
backend 
)

Definition at line 370 of file api_nodb.cc.

References Xapian::Query::get_description(), Xapian::Query::MatchNothing, Xapian::Query::OP_SCALE_WEIGHT, query(), and TEST_EQUAL.

DEFINE_TESTCASE ( scaleweight4  ,
backend 
)

Definition at line 378 of file api_nodb.cc.

References Xapian::Query::get_description(), Xapian::Query::OP_SCALE_WEIGHT, TEST_EQUAL, and TEST_NOT_EQUAL.

DEFINE_TESTCASE ( rset4  ,
backend 
)

Definition at line 393 of file api_nodb.cc.

References Xapian::RSet::add_document(), Xapian::RSet::get_description(), and TEST_STRINGS_EQUAL.

DEFINE_TESTCASE ( opvaluege1  ,
backend 
)

Definition at line 402 of file api_nodb.cc.

References Xapian::Query::get_description(), Xapian::Query::MatchAll, Xapian::Query::OP_VALUE_GE, query(), and TEST_STRINGS_EQUAL.

DEFINE_TESTCASE ( nearsubqueries1  ,
backend 
)

Regression test - this threw AssertionError in 1.0.9 and earlier (bug#201).

Definition at line 409 of file api_nodb.cc.

References Xapian::Query::OP_NEAR, Xapian::Query::OP_OR, and TEST_EXCEPTION.


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