tests/api_query.cc File Reference

Query-related tests which don't need a backend. More...

#include <config.h>
#include "api_query.h"
#include <xapian.h>
#include "testsuite.h"
#include "testutils.h"
#include "utils.h"
#include "apitest.h"

Include dependency graph for api_query.cc:

Go to the source code of this file.

Functions

 DEFINE_TESTCASE (queryterms1,!backend)
 Regression test - in 1.0.10 and earlier "" was included in the list.
 DEFINE_TESTCASE (matchnothing1,!backend)
 DEFINE_TESTCASE (nearsubqueries1,!backend)
 Regression test and feature test.


Detailed Description

Query-related tests which don't need a backend.

Definition in file api_query.cc.


Function Documentation

DEFINE_TESTCASE ( nearsubqueries1  ,
backend 
)

Regression test and feature test.

This threw AssertionError in 1.0.9 and earlier (bug#201) and gave valgrind errors in 1.0.11 and earlier (bug#349).

Having two non-leaf subqueries with OP_NEAR used to be expected to throw UnimplementedError, but now actually works.

Definition at line 66 of file api_query.cc.

References Xapian::Query::get_description(), Xapian::Query::OP_NEAR, Xapian::Query::OP_OR, Xapian::Query::OP_PHRASE, TEST_EXCEPTION, and TEST_STRINGS_EQUAL.

DEFINE_TESTCASE ( matchnothing1  ,
backend 
)

DEFINE_TESTCASE ( queryterms1  ,
backend 
)

Regression test - in 1.0.10 and earlier "" was included in the list.

Definition at line 37 of file api_query.cc.

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


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