256 const char * target =
"\xe4\xb8\x80\xe4\xba\x9b";
#define TEST(a)
Test a condition, without an additional explanation for failure.
This class is used to access a database, or a group of databases.
void remove_spelling(const std::string &word, Xapian::termcount freqdec=1) const
Remove a word from the spelling dictionary.
Xapian::WritableDatabase get_writable_database(const string &dbname)
a generic test suite engine
void skip_to(const std::string &term)
Advance the iterator to term term.
DEFINE_TESTCASE(spell0, spelling||remote)
Xapian::WritableDatabase get_named_writable_database(const std::string &name, const std::string &source)
test functionality of the Xapian API
Class for iterating over a list of terms.
This class provides read/write access to a database.
Xapian::TermIterator spellings_begin() const
An iterator which returns all the spelling correction targets.
Public interfaces for the Xapian library.
void commit()
Commit any pending modifications made to the database.
Xapian::Database get_writable_database_as_database()
void add_database(const Database &database)
Add an existing database (or group of databases) to those accessed by this object.
std::string get_spelling_suggestion(const std::string &word, unsigned max_edit_distance=2) const
Suggest a spelling correction.
Xapian-specific test helper functions and macros.
Xapian::TermIterator spellings_end() const
Corresponding end iterator to spellings_begin().
#define TEST_EQUAL(a, b)
Test for equality of two things.
void add_spelling(const std::string &word, Xapian::termcount freqinc=1) const
Add a word to the spelling dictionary.