]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/cintltst/cbiditst.h
ICU-57131.0.1.tar.gz
[apple/icu.git] / icuSources / test / cintltst / cbiditst.h
CommitLineData
b75a7d8f 1/********************************************************************
57a6839d 2 * COPYRIGHT:
2ca993e8 3 * Copyright (c) 1997-2016, International Business Machines Corporation and
b75a7d8f
A
4 * others. All Rights Reserved.
5 ********************************************************************/
6/* file name: cbiditst.h
7* encoding: US-ASCII
8* tab size: 8 (not used)
9* indentation:4
10*
11* created on: 1999sep22
12* created by: Markus W. Scherer
13*/
14
15#ifndef CBIDITST_H
16#define CBIDITST_H
17
18#include "unicode/utypes.h"
19#include "unicode/uchar.h"
20#include "unicode/ubidi.h"
21
4388f060 22#ifdef __cplusplus
b75a7d8f
A
23extern "C" {
24#endif
25
26#define MAX_STRING_LENGTH 200
27
b75a7d8f
A
28/* Comparing the description of the BiDi algorithm with this implementation
29 is easier with the same names for the BiDi types in the code as there.
30 See UCharDirection in uchar.h .
31*/
46f4442e
A
32#define L U_LEFT_TO_RIGHT
33#define R U_RIGHT_TO_LEFT
34#define EN U_EUROPEAN_NUMBER
35#define ES U_EUROPEAN_NUMBER_SEPARATOR
36#define ET U_EUROPEAN_NUMBER_TERMINATOR
37#define AN U_ARABIC_NUMBER
38#define CS U_COMMON_NUMBER_SEPARATOR
39#define B U_BLOCK_SEPARATOR
40#define S U_SEGMENT_SEPARATOR
41#define WS U_WHITE_SPACE_NEUTRAL
42#define ON U_OTHER_NEUTRAL
43#define LRE U_LEFT_TO_RIGHT_EMBEDDING
44#define LRO U_LEFT_TO_RIGHT_OVERRIDE
45#define AL U_RIGHT_TO_LEFT_ARABIC
46#define RLE U_RIGHT_TO_LEFT_EMBEDDING
47#define RLO U_RIGHT_TO_LEFT_OVERRIDE
48#define PDF U_POP_DIRECTIONAL_FORMAT
49#define NSM U_DIR_NON_SPACING_MARK
50#define BN U_BOUNDARY_NEUTRAL
57a6839d
A
51#define FSI U_FIRST_STRONG_ISOLATE
52#define LRI U_LEFT_TO_RIGHT_ISOLATE
53#define RLI U_RIGHT_TO_LEFT_ISOLATE
54#define PDI U_POP_DIRECTIONAL_ISOLATE
b75a7d8f 55
46f4442e
A
56extern const char * const
57dirPropNames[U_CHAR_DIRECTION_COUNT];
b75a7d8f 58
374ca955 59extern UChar
46f4442e 60charFromDirProp[U_CHAR_DIRECTION_COUNT];
b75a7d8f
A
61
62typedef struct {
63 const uint8_t *text;
64 int32_t length;
65 UBiDiLevel paraLevel;
66 int32_t lineStart, lineLimit;
67 UBiDiDirection direction;
68 UBiDiLevel resultLevel;
69 const UBiDiLevel *levels;
70 const uint8_t *visualMap;
71} BiDiTestData;
72
46f4442e 73extern const BiDiTestData
b75a7d8f
A
74tests[];
75
46f4442e 76extern const int
b75a7d8f
A
77bidiTestCount;
78
4388f060 79#ifdef __cplusplus
b75a7d8f
A
80}
81#endif
82
83#endif