This source file includes following definitions.
- main
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #include <config.h>
18
19 #include "unictype.h"
20
21 #include <string.h>
22
23 #include "macros.h"
24
25 int
26 main ()
27 {
28 ASSERT (uc_bidi_class_byname ("L") == UC_BIDI_L);
29 ASSERT (uc_bidi_class_byname ("LRE") == UC_BIDI_LRE);
30 ASSERT (uc_bidi_class_byname ("LRO") == UC_BIDI_LRO);
31 ASSERT (uc_bidi_class_byname ("R") == UC_BIDI_R);
32 ASSERT (uc_bidi_class_byname ("AL") == UC_BIDI_AL);
33 ASSERT (uc_bidi_class_byname ("RLE") == UC_BIDI_RLE);
34 ASSERT (uc_bidi_class_byname ("RLO") == UC_BIDI_RLO);
35 ASSERT (uc_bidi_class_byname ("PDF") == UC_BIDI_PDF);
36 ASSERT (uc_bidi_class_byname ("EN") == UC_BIDI_EN);
37 ASSERT (uc_bidi_class_byname ("ES") == UC_BIDI_ES);
38 ASSERT (uc_bidi_class_byname ("ET") == UC_BIDI_ET);
39 ASSERT (uc_bidi_class_byname ("AN") == UC_BIDI_AN);
40 ASSERT (uc_bidi_class_byname ("CS") == UC_BIDI_CS);
41 ASSERT (uc_bidi_class_byname ("NSM") == UC_BIDI_NSM);
42 ASSERT (uc_bidi_class_byname ("BN") == UC_BIDI_BN);
43 ASSERT (uc_bidi_class_byname ("B") == UC_BIDI_B);
44 ASSERT (uc_bidi_class_byname ("S") == UC_BIDI_S);
45 ASSERT (uc_bidi_class_byname ("WS") == UC_BIDI_WS);
46 ASSERT (uc_bidi_class_byname ("ON") == UC_BIDI_ON);
47
48 ASSERT (uc_bidi_class_byname ("ARABIC LETTER") == UC_BIDI_AL);
49 ASSERT (uc_bidi_class_byname ("Arabic Letter") == UC_BIDI_AL);
50 ASSERT (uc_bidi_class_byname ("Arabic_Letter") == UC_BIDI_AL);
51 ASSERT (uc_bidi_class_byname ("ArabicLetter") == UC_BIDI_AL);
52 ASSERT (uc_bidi_class_byname ("ARABIC NUMBER") == UC_BIDI_AN);
53 ASSERT (uc_bidi_class_byname ("Arabic Number") == UC_BIDI_AN);
54 ASSERT (uc_bidi_class_byname ("Arabic_Number") == UC_BIDI_AN);
55 ASSERT (uc_bidi_class_byname ("ArabicNumber") == UC_BIDI_AN);
56 ASSERT (uc_bidi_class_byname ("PARAGRAPH SEPARATOR") == UC_BIDI_B);
57 ASSERT (uc_bidi_class_byname ("Paragraph Separator") == UC_BIDI_B);
58 ASSERT (uc_bidi_class_byname ("Paragraph_Separator") == UC_BIDI_B);
59 ASSERT (uc_bidi_class_byname ("ParagraphSeparator") == UC_BIDI_B);
60 ASSERT (uc_bidi_class_byname ("BOUNDARY NEUTRAL") == UC_BIDI_BN);
61 ASSERT (uc_bidi_class_byname ("Boundary Neutral") == UC_BIDI_BN);
62 ASSERT (uc_bidi_class_byname ("Boundary_Neutral") == UC_BIDI_BN);
63 ASSERT (uc_bidi_class_byname ("BoundaryNeutral") == UC_BIDI_BN);
64 ASSERT (uc_bidi_class_byname ("COMMON SEPARATOR") == UC_BIDI_CS);
65 ASSERT (uc_bidi_class_byname ("Common Separator") == UC_BIDI_CS);
66 ASSERT (uc_bidi_class_byname ("Common_Separator") == UC_BIDI_CS);
67 ASSERT (uc_bidi_class_byname ("CommonSeparator") == UC_BIDI_CS);
68 ASSERT (uc_bidi_class_byname ("EUROPEAN NUMBER") == UC_BIDI_EN);
69 ASSERT (uc_bidi_class_byname ("European Number") == UC_BIDI_EN);
70 ASSERT (uc_bidi_class_byname ("European_Number") == UC_BIDI_EN);
71 ASSERT (uc_bidi_class_byname ("EuropeanNumber") == UC_BIDI_EN);
72 ASSERT (uc_bidi_class_byname ("EUROPEAN SEPARATOR") == UC_BIDI_ES);
73 ASSERT (uc_bidi_class_byname ("European Separator") == UC_BIDI_ES);
74 ASSERT (uc_bidi_class_byname ("European_Separator") == UC_BIDI_ES);
75 ASSERT (uc_bidi_class_byname ("EuropeanSeparator") == UC_BIDI_ES);
76 ASSERT (uc_bidi_class_byname ("EUROPEAN TERMINATOR") == UC_BIDI_ET);
77 ASSERT (uc_bidi_class_byname ("European Terminator") == UC_BIDI_ET);
78 ASSERT (uc_bidi_class_byname ("European_Terminator") == UC_BIDI_ET);
79 ASSERT (uc_bidi_class_byname ("EuropeanTerminator") == UC_BIDI_ET);
80 ASSERT (uc_bidi_class_byname ("LEFT TO RIGHT") == UC_BIDI_L);
81 ASSERT (uc_bidi_class_byname ("Left To Right") == UC_BIDI_L);
82 ASSERT (uc_bidi_class_byname ("Left_To_Right") == UC_BIDI_L);
83 ASSERT (uc_bidi_class_byname ("LeftToRight") == UC_BIDI_L);
84 ASSERT (uc_bidi_class_byname ("LEFT TO RIGHT EMBEDDING") == UC_BIDI_LRE);
85 ASSERT (uc_bidi_class_byname ("Left To Right Embedding") == UC_BIDI_LRE);
86 ASSERT (uc_bidi_class_byname ("Left_To_Right_Embedding") == UC_BIDI_LRE);
87 ASSERT (uc_bidi_class_byname ("LeftToRightEmbedding") == UC_BIDI_LRE);
88 ASSERT (uc_bidi_class_byname ("LEFT TO RIGHT OVERRIDE") == UC_BIDI_LRO);
89 ASSERT (uc_bidi_class_byname ("Left To Right Override") == UC_BIDI_LRO);
90 ASSERT (uc_bidi_class_byname ("Left_To_Right_Override") == UC_BIDI_LRO);
91 ASSERT (uc_bidi_class_byname ("LeftToRightOverride") == UC_BIDI_LRO);
92 ASSERT (uc_bidi_class_byname ("NONSPACING MARK") == UC_BIDI_NSM);
93 ASSERT (uc_bidi_class_byname ("Nonspacing Mark") == UC_BIDI_NSM);
94 ASSERT (uc_bidi_class_byname ("Nonspacing_Mark") == UC_BIDI_NSM);
95 ASSERT (uc_bidi_class_byname ("NonspacingMark") == UC_BIDI_NSM);
96 ASSERT (uc_bidi_class_byname ("OTHER NEUTRAL") == UC_BIDI_ON);
97 ASSERT (uc_bidi_class_byname ("Other Neutral") == UC_BIDI_ON);
98 ASSERT (uc_bidi_class_byname ("Other_Neutral") == UC_BIDI_ON);
99 ASSERT (uc_bidi_class_byname ("OtherNeutral") == UC_BIDI_ON);
100 ASSERT (uc_bidi_class_byname ("POP DIRECTIONAL FORMAT") == UC_BIDI_PDF);
101 ASSERT (uc_bidi_class_byname ("Pop Directional Format") == UC_BIDI_PDF);
102 ASSERT (uc_bidi_class_byname ("Pop_Directional_Format") == UC_BIDI_PDF);
103 ASSERT (uc_bidi_class_byname ("PopDirectionalFormat") == UC_BIDI_PDF);
104 ASSERT (uc_bidi_class_byname ("RIGHT TO LEFT") == UC_BIDI_R);
105 ASSERT (uc_bidi_class_byname ("Right To Left") == UC_BIDI_R);
106 ASSERT (uc_bidi_class_byname ("Right_To_Left") == UC_BIDI_R);
107 ASSERT (uc_bidi_class_byname ("RightToLeft") == UC_BIDI_R);
108 ASSERT (uc_bidi_class_byname ("RIGHT TO LEFT EMBEDDING") == UC_BIDI_RLE);
109 ASSERT (uc_bidi_class_byname ("Right To Left Embedding") == UC_BIDI_RLE);
110 ASSERT (uc_bidi_class_byname ("Right_To_Left_Embedding") == UC_BIDI_RLE);
111 ASSERT (uc_bidi_class_byname ("RightToLeftEmbedding") == UC_BIDI_RLE);
112 ASSERT (uc_bidi_class_byname ("RIGHT TO LEFT OVERRIDE") == UC_BIDI_RLO);
113 ASSERT (uc_bidi_class_byname ("Right To Left Override") == UC_BIDI_RLO);
114 ASSERT (uc_bidi_class_byname ("Right_To_Left_Override") == UC_BIDI_RLO);
115 ASSERT (uc_bidi_class_byname ("RightToLeftOverride") == UC_BIDI_RLO);
116 ASSERT (uc_bidi_class_byname ("SEGMENT SEPARATOR") == UC_BIDI_S);
117 ASSERT (uc_bidi_class_byname ("Segment Separator") == UC_BIDI_S);
118 ASSERT (uc_bidi_class_byname ("Segment_Separator") == UC_BIDI_S);
119 ASSERT (uc_bidi_class_byname ("SegmentSeparator") == UC_BIDI_S);
120 ASSERT (uc_bidi_class_byname ("WHITE SPACE") == UC_BIDI_WS);
121 ASSERT (uc_bidi_class_byname ("White Space") == UC_BIDI_WS);
122 ASSERT (uc_bidi_class_byname ("White_Space") == UC_BIDI_WS);
123 ASSERT (uc_bidi_class_byname ("WhiteSpace") == UC_BIDI_WS);
124
125 ASSERT (uc_bidi_class_byname ("X") < 0);
126 ASSERT (uc_bidi_class_byname ("") < 0);
127
128 return 0;
129 }