]> git.saurik.com Git - apple/icu.git/blob - icuSources/test/cintltst/cbiditst.h
ICU-57132.0.1.tar.gz
[apple/icu.git] / icuSources / test / cintltst / cbiditst.h
1 /********************************************************************
2 * COPYRIGHT:
3 * Copyright (c) 1997-2016, International Business Machines Corporation and
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
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 #define MAX_STRING_LENGTH 200
27
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 */
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
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
55
56 extern const char * const
57 dirPropNames[U_CHAR_DIRECTION_COUNT];
58
59 extern UChar
60 charFromDirProp[U_CHAR_DIRECTION_COUNT];
61
62 typedef 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
73 extern const BiDiTestData
74 tests[];
75
76 extern const int
77 bidiTestCount;
78
79 #ifdef __cplusplus
80 }
81 #endif
82
83 #endif