tests/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 support.
 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 ( unicodepredicates1  ,
backend 
)

DEFINE_TESTCASE ( utf8convert1  ,
backend 
)

Definition at line 251 of file api_unicode.cc.

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

DEFINE_TESTCASE ( caseconvert2  ,
backend 
)

DEFINE_TESTCASE ( caseconvert1  ,
backend 
)

DEFINE_TESTCASE ( unicode1  ,
backend 
)

DEFINE_TESTCASE ( utf8iterator2  ,
backend 
)

Definition at line 134 of file api_unicode.cc.

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

DEFINE_TESTCASE ( utf8iterator1  ,
backend 
)

Definition at line 90 of file api_unicode.cc.

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


Variable Documentation

const testcase testcases[] [static]

Definition at line 38 of file api_unicode.cc.

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.


Documentation for Xapian (version 1.2.8).
Generated on 14 Dec 2011 by Doxygen 1.5.9.