xapian-core  1.4.21
Classes | Functions | Variables
api_unicode.cc File Reference

Test the Unicode and UTF-8 classes and functions. More...

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

Go to the source code of this file.

Classes

struct  testcase
 
struct  testcase2
 

Functions

 DEFINE_TESTCASE (utf8iterator1, !backend)
 
 DEFINE_TESTCASE (utf8iterator2, !backend)
 
 DEFINE_TESTCASE (unicode1, !backend)
 
 DEFINE_TESTCASE (caseconvert1, !backend)
 
 DEFINE_TESTCASE (caseconvert2, !backend)
 Test Unicode 5.1 and later support. More...
 
 DEFINE_TESTCASE (utf8convert1, !backend)
 
 DEFINE_TESTCASE (unicodepredicates1, !backend)
 

Variables

static const testcase testcases []
 
static const testcase2 testcases2 []
 

Detailed Description

Test the Unicode and UTF-8 classes and functions.

Definition in file api_unicode.cc.

Function Documentation

◆ DEFINE_TESTCASE() [1/7]

DEFINE_TESTCASE ( utf8iterator1  ,
backend 
)

Definition at line 91 of file api_unicode.cc.

References testcase::a, testcase::b, TEST, TEST_EQUAL, and tout.

◆ DEFINE_TESTCASE() [2/7]

DEFINE_TESTCASE ( utf8iterator2  ,
backend 
)

Definition at line 134 of file api_unicode.cc.

References testcase2::a, testcase2::n, TEST, and TEST_EQUAL.

◆ DEFINE_TESTCASE() [3/7]

DEFINE_TESTCASE ( unicode1  ,
backend 
)

◆ DEFINE_TESTCASE() [4/7]

DEFINE_TESTCASE ( caseconvert1  ,
backend 
)

◆ DEFINE_TESTCASE() [5/7]

DEFINE_TESTCASE ( caseconvert2  ,
backend 
)

◆ DEFINE_TESTCASE() [6/7]

DEFINE_TESTCASE ( utf8convert1  ,
backend 
)

Definition at line 392 of file api_unicode.cc.

References Xapian::Unicode::append_utf8(), and TEST_STRINGS_EQUAL.

◆ DEFINE_TESTCASE() [7/7]

DEFINE_TESTCASE ( unicodepredicates1  ,
backend 
)

Variable Documentation

◆ testcases

const testcase testcases[]
static

Definition at line 39 of file api_unicode.cc.

Referenced by DEFINE_TESTCASE().

◆ testcases2

const testcase2 testcases2[]
static
Initial value:
= {
{ "a", 97 },
{ "\x80", 128 },
{ "\xa0", 160 },
{ "\xc2\x80", 128 },
{ "\xc2\xa0", 160 },
{ "\xe0\xa0\x80", 0x0800 },
{ "\xe1\x80\x80", 0x1000 },
{ "\xf0\xa8\xa8\x8f", 166415 },
{ "\xf3\x80\x80\x80", 0x0c0000 },
{ "\xf4\x80\x80\x80", 0x100000 },
{ 0, 0 }
}

Definition at line 119 of file api_unicode.cc.