xapian-core  2.0.0
Macros | Functions
api_spelling.cc File Reference

Test the spelling correction suggestion API. More...

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

Go to the source code of this file.

Macros

#define TARGET   "\xe4\xb8\x80\xe4\xba\x9b"
 

Functions

 DEFINE_TESTCASE (spell0,(spelling||remote) &&writable)
 
 DEFINE_TESTCASE (spell1, spelling &&writable)
 
 DEFINE_TESTCASE (spell2, spelling &&writable)
 
 DEFINE_TESTCASE (spell3, spelling)
 
 DEFINE_TESTCASE (spell4, spelling)
 
 DEFINE_TESTCASE (spell5, spelling)
 
 DEFINE_TESTCASE (spell6, spelling &&writable)
 
 DEFINE_TESTCASE (spell7, spelling)
 
 DEFINE_TESTCASE (spell8, spelling)
 Regression test - repeated trigrams cancelled in 1.2.5 and earlier. More...
 
 DEFINE_TESTCASE (spell9, spelling)
 Regression test for honey spelling encoding bug affecting "tail" entries. More...
 
 DEFINE_TESTCASE (spell10, spelling)
 Regression test for bug due to rejecting based on matching n-gram count. More...
 

Detailed Description

Test the spelling correction suggestion API.

Definition in file api_spelling.cc.

Macro Definition Documentation

◆ TARGET

#define TARGET   "\xe4\xb8\x80\xe4\xba\x9b"

Function Documentation

◆ DEFINE_TESTCASE() [1/11]

DEFINE_TESTCASE ( spell0  ,
(spelling||remote) &&  writable 
)

◆ DEFINE_TESTCASE() [2/11]

DEFINE_TESTCASE ( spell1  ,
spelling &&  writable 
)

◆ DEFINE_TESTCASE() [3/11]

DEFINE_TESTCASE ( spell10  ,
spelling   
)

Regression test for bug due to rejecting based on matching n-gram count.

Definition at line 333 of file api_spelling.cc.

References Xapian::WritableDatabase::add_spelling(), get_database(), Xapian::Database::get_spelling_suggestion(), and TEST_EQUAL.

◆ DEFINE_TESTCASE() [4/11]

DEFINE_TESTCASE ( spell2  ,
spelling &&  writable 
)

◆ DEFINE_TESTCASE() [5/11]

DEFINE_TESTCASE ( spell3  ,
spelling   
)

◆ DEFINE_TESTCASE() [6/11]

DEFINE_TESTCASE ( spell4  ,
spelling   
)

◆ DEFINE_TESTCASE() [7/11]

DEFINE_TESTCASE ( spell5  ,
spelling   
)

◆ DEFINE_TESTCASE() [8/11]

DEFINE_TESTCASE ( spell6  ,
spelling &&  writable 
)

◆ DEFINE_TESTCASE() [9/11]

DEFINE_TESTCASE ( spell7  ,
spelling   
)

◆ DEFINE_TESTCASE() [10/11]

DEFINE_TESTCASE ( spell8  ,
spelling   
)

Regression test - repeated trigrams cancelled in 1.2.5 and earlier.

Definition at line 308 of file api_spelling.cc.

References Xapian::WritableDatabase::add_spelling(), get_database(), Xapian::Database::get_spelling_suggestion(), and TEST_EQUAL.

◆ DEFINE_TESTCASE() [11/11]

DEFINE_TESTCASE ( spell9  ,
spelling   
)

Regression test for honey spelling encoding bug affecting "tail" entries.

Definition at line 321 of file api_spelling.cc.

References Xapian::WritableDatabase::add_spelling(), get_database(), Xapian::Database::get_spelling_suggestion(), and TEST_EQUAL.