xapian-core
1.4.27
|
Tests of Xapian::TermGenerator. More...
#include <config.h>
#include "api_termgen.h"
#include <xapian.h>
#include <string>
#include <array>
#include "apitest.h"
#include "str.h"
#include "testsuite.h"
#include "testutils.h"
Go to the source code of this file.
Functions | |
static string | format_doc_termlist (const Xapian::Document &doc) |
DEFINE_TESTCASE (termgen1, !backend) | |
DEFINE_TESTCASE (tg_spell1, spelling &&writable) | |
Test spelling data generation. More... | |
DEFINE_TESTCASE (tg_spell2, !backend) | |
Regression test for bug fixed in 1.0.5 - previously this segfaulted. More... | |
DEFINE_TESTCASE (tg_max_word_length1, !backend) | |
Variables | |
static const test | test_simple [] |
Tests of Xapian::TermGenerator.
Definition in file api_termgen.cc.
DEFINE_TESTCASE | ( | termgen1 | , |
! | backend | ||
) |
Definition at line 734 of file api_termgen.cc.
References FAIL_TEST, Xapian::TermGenerator::FLAG_NGRAMS, format_doc_termlist(), Xapian::Error::get_description(), Xapian::TermGenerator::increase_termpos(), Xapian::TermGenerator::index_text(), Xapian::TermGenerator::index_text_without_positions(), Xapian::Stopper::release(), Xapian::TermGenerator::set_document(), Xapian::TermGenerator::set_flags(), Xapian::TermGenerator::set_stemmer(), Xapian::TermGenerator::set_stemming_strategy(), Xapian::TermGenerator::set_stopper(), Xapian::TermGenerator::set_stopper_strategy(), Xapian::TermGenerator::STEM_ALL, Xapian::TermGenerator::STEM_ALL_Z, Xapian::TermGenerator::STEM_NONE, Xapian::TermGenerator::STEM_SOME, Xapian::TermGenerator::STEM_SOME_FULL_POS, stemmer, Xapian::TermGenerator::STOP_ALL, Xapian::TermGenerator::STOP_NONE, Xapian::TermGenerator::STOP_STEMMED, TEST_STRINGS_EQUAL, and tout.
DEFINE_TESTCASE | ( | tg_spell1 | , |
spelling && | writable | ||
) |
Test spelling data generation.
Definition at line 846 of file api_termgen.cc.
References Xapian::TermGenerator::FLAG_SPELLING, Xapian::Database::get_spelling_suggestion(), get_writable_database(), Xapian::TermGenerator::index_text(), Xapian::TermGenerator::set_database(), Xapian::TermGenerator::set_document(), Xapian::TermGenerator::set_flags(), and TEST_STRINGS_EQUAL.
DEFINE_TESTCASE | ( | tg_spell2 | , |
! | backend | ||
) |
Regression test for bug fixed in 1.0.5 - previously this segfaulted.
Definition at line 869 of file api_termgen.cc.
References Xapian::TermGenerator::FLAG_SPELLING, Xapian::TermGenerator::index_text(), Xapian::TermGenerator::set_document(), Xapian::TermGenerator::set_flags(), and TEST_EXCEPTION.
DEFINE_TESTCASE | ( | tg_max_word_length1 | , |
! | backend | ||
) |
Definition at line 879 of file api_termgen.cc.
References format_doc_termlist(), Xapian::TermGenerator::index_text(), Xapian::TermGenerator::set_document(), Xapian::TermGenerator::set_max_word_length(), Xapian::TermGenerator::set_stemmer(), and TEST_STRINGS_EQUAL.
|
static |
Definition at line 703 of file api_termgen.cc.
References Xapian::TermIterator::get_wdf(), Xapian::TermIterator::positionlist_begin(), Xapian::TermIterator::positionlist_count(), Xapian::TermIterator::positionlist_end(), Xapian::Internal::str(), Xapian::Document::termlist_begin(), and Xapian::Document::termlist_end().
Referenced by DEFINE_TESTCASE().
|
static |
Definition at line 86 of file api_termgen.cc.