xapian-core
1.4.26
|
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"
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... | |
tests of the value statistics functions.
Definition in file api_valuestats.cc.
DEFINE_TESTCASE | ( | valuestats1 | , |
writable && | valuestats | ||
) |
Test of value statistics methods.
Definition at line 39 of file api_valuestats.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_value(), Xapian::WritableDatabase::delete_document(), Xapian::Database::get_value_freq(), Xapian::Database::get_value_lower_bound(), Xapian::Database::get_value_upper_bound(), get_writable_database(), Xapian::WritableDatabase::replace_document(), Xapian::Database::size(), and TEST_EQUAL.
DEFINE_TESTCASE | ( | valuestats2 | , |
transactions && | valuestats | ||
) |
Test that value statistics stuff obeys transactions.
Definition at line 114 of file api_valuestats.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_value(), Xapian::WritableDatabase::commit(), Xapian::WritableDatabase::delete_document(), Xapian::Database::get_value_freq(), Xapian::Database::get_value_lower_bound(), Xapian::Database::get_value_upper_bound(), get_writable_database(), get_writable_database_as_database(), Xapian::Database::reopen(), Xapian::WritableDatabase::replace_document(), Xapian::Database::size(), TEST, and TEST_EQUAL.
DEFINE_TESTCASE | ( | valuestats3 | , |
valuestats | |||
) |
Test reading value statistics from prebuilt databases.
Definition at line 233 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 | ( | valuestats4 | , |
transactions && | valuestats | ||
) |
Definition at line 271 of file api_valuestats.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_value(), Xapian::WritableDatabase::begin_transaction(), Xapian::WritableDatabase::cancel_transaction(), Xapian::Database::get_doccount(), Xapian::Database::get_value_freq(), Xapian::Database::get_value_lower_bound(), Xapian::Database::get_value_upper_bound(), get_writable_database(), get_writable_database_as_database(), Xapian::Database::size(), and TEST_EQUAL.
DEFINE_TESTCASE | ( | valuestats5 | , |
! | backend | ||
) |
Regression test for bug fixed in 1.1.1 which led to incorrect valuestats.
Definition at line 308 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().