This source file includes following definitions.
- main
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #include <config.h>
20
21 #include "uninorm.h"
22
23 #include "macros.h"
24
25 int
26 main ()
27 {
28 ucs4_t decomposed[UC_DECOMPOSITION_MAX_LENGTH];
29 int ret;
30
31
32 ret = uc_canonical_decomposition (0x0020, decomposed);
33 ASSERT (ret == -1);
34
35
36 ret = uc_canonical_decomposition (0x00C4, decomposed);
37 ASSERT (ret == 2);
38 ASSERT (decomposed[0] == 0x0041);
39 ASSERT (decomposed[1] == 0x0308);
40
41
42 ret = uc_canonical_decomposition (0x01DE, decomposed);
43 ASSERT (ret == 2);
44 ASSERT (decomposed[0] == 0x00C4);
45 ASSERT (decomposed[1] == 0x0304);
46
47
48 ret = uc_canonical_decomposition (0x1FC1, decomposed);
49 ASSERT (ret == 2);
50 ASSERT (decomposed[0] == 0x00A8);
51 ASSERT (decomposed[1] == 0x0342);
52
53
54 ret = uc_canonical_decomposition (0x2113, decomposed);
55 ASSERT (ret == -1);
56
57
58 ret = uc_canonical_decomposition (0x00A0, decomposed);
59 ASSERT (ret == -1);
60
61
62 ret = uc_canonical_decomposition (0xFB6C, decomposed);
63 ASSERT (ret == -1);
64
65
66 ret = uc_canonical_decomposition (0xFB6D, decomposed);
67 ASSERT (ret == -1);
68
69
70 ret = uc_canonical_decomposition (0xFB6B, decomposed);
71 ASSERT (ret == -1);
72
73
74 ret = uc_canonical_decomposition (0xFB6A, decomposed);
75 ASSERT (ret == -1);
76
77
78 ret = uc_canonical_decomposition (0x246E, decomposed);
79 ASSERT (ret == -1);
80
81
82 ret = uc_canonical_decomposition (0x2122, decomposed);
83 ASSERT (ret == -1);
84
85
86 ret = uc_canonical_decomposition (0x1D62, decomposed);
87 ASSERT (ret == -1);
88
89
90 ret = uc_canonical_decomposition (0xFE35, decomposed);
91 ASSERT (ret == -1);
92
93
94 ret = uc_canonical_decomposition (0xFF21, decomposed);
95 ASSERT (ret == -1);
96
97
98 ret = uc_canonical_decomposition (0xFF64, decomposed);
99 ASSERT (ret == -1);
100
101
102 ret = uc_canonical_decomposition (0xFE51, decomposed);
103 ASSERT (ret == -1);
104
105
106 ret = uc_canonical_decomposition (0x3392, decomposed);
107 ASSERT (ret == -1);
108
109
110 ret = uc_canonical_decomposition (0x215C, decomposed);
111 ASSERT (ret == -1);
112
113
114 ret = uc_canonical_decomposition (0x00B5, decomposed);
115 ASSERT (ret == -1);
116
117
118 ret = uc_canonical_decomposition (0xFDFA, decomposed);
119 ASSERT (ret == -1);
120
121
122 ret = uc_canonical_decomposition (0xAE00, decomposed);
123
124
125 #if 1
126 ASSERT (ret == 2);
127 ASSERT (decomposed[0] == 0xADF8);
128 ASSERT (decomposed[1] == 0x11AF);
129 #else
130 ASSERT (ret == 3);
131 ASSERT (decomposed[0] == 0x1100);
132 ASSERT (decomposed[1] == 0x1173);
133 ASSERT (decomposed[2] == 0x11AF);
134 #endif
135
136
137 ret = uc_canonical_decomposition (0xADF8, decomposed);
138 ASSERT (ret == 2);
139 ASSERT (decomposed[0] == 0x1100);
140 ASSERT (decomposed[1] == 0x1173);
141
142 return 0;
143 }