xapian-core  1.4.20
Functions
api_valuestats.cc File Reference

tests of the value statistics functions. More...

#include <config.h>
#include "api_valuestats.h"
#include <xapian.h>
#include "testsuite.h"
#include "testutils.h"
#include "apitest.h"
+ Include dependency graph for api_valuestats.cc:

Go to the source code of this file.

Functions

 DEFINE_TESTCASE (valuestats1, writable &&valuestats)
 Test of value statistics methods. More...
 
 DEFINE_TESTCASE (valuestats2, transactions &&valuestats)
 Test that value statistics stuff obeys transactions. More...
 
 DEFINE_TESTCASE (valuestats3, valuestats)
 Test reading value statistics from prebuilt databases. More...
 
 DEFINE_TESTCASE (valuestats4, transactions &&valuestats)
 
 DEFINE_TESTCASE (valuestats5, !backend)
 Regression test for bug fixed in 1.1.1 which led to incorrect valuestats. More...
 

Detailed Description

tests of the value statistics functions.

Definition in file api_valuestats.cc.

Function Documentation

◆ DEFINE_TESTCASE() [1/5]

DEFINE_TESTCASE ( valuestats1  ,
writable &&  valuestats 
)

◆ DEFINE_TESTCASE() [2/5]

DEFINE_TESTCASE ( valuestats2  ,
transactions &&  valuestats 
)

◆ DEFINE_TESTCASE() [3/5]

DEFINE_TESTCASE ( valuestats3  ,
valuestats   
)

Test reading value statistics from prebuilt databases.

Definition at line 226 of file api_valuestats.cc.

References get_database(), Xapian::Database::get_value_freq(), Xapian::Database::get_value_lower_bound(), Xapian::Database::get_value_upper_bound(), and TEST_EQUAL.

◆ DEFINE_TESTCASE() [4/5]

DEFINE_TESTCASE ( valuestats4  ,
transactions &&  valuestats 
)

◆ DEFINE_TESTCASE() [5/5]

DEFINE_TESTCASE ( valuestats5  ,
backend 
)

Regression test for bug fixed in 1.1.1 which led to incorrect valuestats.

Definition at line 299 of file api_valuestats.cc.

References Xapian::Document::add_value(), Xapian::Document::remove_value(), TEST, TEST_EQUAL, Xapian::Document::values_begin(), and Xapian::Document::values_end().