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)

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 ( utf8iterator1  ,
backend 
)

Definition at line 46 of file api_unicode.cc.

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

DEFINE_TESTCASE ( utf8iterator2  ,
backend 
)

Definition at line 85 of file api_unicode.cc.

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

DEFINE_TESTCASE ( unicode1  ,
backend 
)

Definition at line 98 of file api_unicode.cc.

References Xapian::Unicode::CURRENCY_SYMBOL, Xapian::Unicode::DECIMAL_DIGIT_NUMBER, Xapian::Unicode::get_category(), Xapian::Unicode::LOWERCASE_LETTER, Xapian::Unicode::OTHER_LETTER, Xapian::Unicode::PRIVATE_USE, TEST_EQUAL, and Xapian::Unicode::UNASSIGNED.

DEFINE_TESTCASE ( caseconvert1  ,
backend 
)

Definition at line 117 of file api_unicode.cc.

References TEST_EQUAL, Xapian::Unicode::tolower(), and Xapian::Unicode::toupper().


Variable Documentation

const testcase testcases[] [static]

Initial value:

 {
    { "abcd", "abcd" }, 
    { "a\x80""bcd", "a\xc2\x80""bcd" },
    { "a\xa0", "a\xc2\xa0" },
    { 0, 0 }
}

Definition at line 38 of file api_unicode.cc.

Referenced by DEFINE_TESTCASE().

const testcase2 testcases2[] [static]

Initial value:

 {
    { "a", 97 },
    { "\x80", 128 },
    { "\xa0", 160 },
    { "\xc2\x80", 128 },
    { "\xc2\xa0", 160 },
    { "\xf0\xa8\xa8\x8f", 166415 },
    { 0, 0 }
}

Definition at line 74 of file api_unicode.cc.

Referenced by DEFINE_TESTCASE().


Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.