callcoll.h revision ac04d0bbe12b3ef54518635711412f178cb4d16
1/********************************************************************
2 * COPYRIGHT:
3 * Copyright (c) 1997-2006, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 ********************************************************************/
6/********************************************************************************
7*
8* File CALLCOLL.H
9*
10* Modification History:
11*        Name                     Description
12*     Madhu Katragadda              Ported to C
13*********************************************************************************
14*/
15/**
16 * CollationDummyTest is a third level test class.  This tests creation of
17 * a customized collator object.  For example, number 1 to be sorted
18 * equlivalent to word 'one'.
19 */
20#ifndef _CALLCOLLTST
21#define _CALLCOLLTST
22
23#include "unicode/utypes.h"
24#include "unicode/ucoleitr.h"
25
26#if !UCONFIG_NO_COLLATION
27
28#include "cintltst.h"
29
30#define RULE_BUFFER_LEN 8192
31
32
33    /* tests comparison of custom collation with different strengths */
34void doTest(UCollator*, const UChar* source, const UChar* target, UCollationResult result);
35/* verify that iterating forward and backwards over the string yields same CEs */
36void backAndForth(UCollationElements *iter);
37/* gets an array of CEs for a string in UCollationElements iterator. */
38int32_t* getOrders(UCollationElements *iter, int32_t *orderLength);
39
40void genericOrderingTestWithResult(UCollator *coll, const char * const s[], uint32_t size, UCollationResult result);
41void genericOrderingTest(UCollator *coll, const char * const s[], uint32_t size);
42void genericLocaleStarter(const char *locale, const char * const s[], uint32_t size);
43void genericLocaleStarterWithResult(const char *locale, const char * const s[], uint32_t size, UCollationResult result);
44void genericLocaleStarterWithOptions(const char *locale, const char * const s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize);
45void genericLocaleStarterWithOptionsAndResult(const char *locale, const char * const s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize, UCollationResult result);
46void genericRulesStarterWithResult(const char *rules, const char * const s[], uint32_t size, UCollationResult result);
47void genericRulesStarter(const char *rules, const char * const s[], uint32_t size);
48void genericRulesStarterWithOptionsAndResult(const char *rules, const char * const s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize, UCollationResult result);
49UBool hasCollationElements(const char *locName);
50
51
52#endif /* #if !UCONFIG_NO_COLLATION */
53
54#endif
55