tests/api_percentages.cc File Reference

Tests of percentage calculations. More...

#include <config.h>
#include "api_percentages.h"
#include <xapian.h>
#include "apitest.h"
#include "backendmanager_local.h"
#include "testutils.h"
#include <cfloat>

Include dependency graph for api_percentages.cc:

Go to the source code of this file.

Classes

class  MyPostingSource

Functions

 DEFINE_TESTCASE (consistency3, backend)
 DEFINE_TESTCASE (pctcutoff4, backend &&!remote &&!multi)
 Test for rounding errors in percentage weight calculations and cutoffs.
 DEFINE_TESTCASE (pctcutoff5, backend)
 Check we throw for a percentage cutoff while sorting primarily by value.
 DEFINE_TESTCASE (topercent3, remote)
 DEFINE_TESTCASE (topercent4, backend)
 DEFINE_TESTCASE (topercent5, backend)
 Test that a search with a non-existent term doesn't get 100%.


Detailed Description

Tests of percentage calculations.

Definition in file api_percentages.cc.


Function Documentation

DEFINE_TESTCASE ( topercent5  ,
backend   
)

Test that a search with a non-existent term doesn't get 100%.

Definition at line 246 of file api_percentages.cc.

References Xapian::MSet::empty(), get_database(), Xapian::Enquire::get_mset(), Xapian::Query::OP_OR, Xapian::Enquire::set_query(), and TEST.

DEFINE_TESTCASE ( topercent4  ,
backend   
)

DEFINE_TESTCASE ( topercent3  ,
remote   
)

DEFINE_TESTCASE ( pctcutoff5  ,
backend   
)

DEFINE_TESTCASE ( pctcutoff4  ,
backend &&!remote &&!  multi 
)

DEFINE_TESTCASE ( consistency3  ,
backend   
)


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