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 int
20 main ()
21 {
22 {
23 static const UNIT input1[] = { 'a' };
24 static const UNIT input2[] = { 'b' };
25 ASSERT (U_CMP2 (input1, 0, input2, 0) == 0);
26 ASSERT (U_CMP2 (input1, 1, input2, 0) > 0);
27 ASSERT (U_CMP2 (input1, 0, input2, 1) < 0);
28 }
29 {
30 static const UNIT input1[] = { 'f', 'o', 'o', 0 };
31 static const UNIT input2[] = { 'f', 'o', 'o', 'b', 'a', 'r', 0 };
32 ASSERT (U_CMP2 (input1, 3, input2, 3) == 0);
33 ASSERT (U_CMP2 (input1, 4, input2, 3) > 0);
34 ASSERT (U_CMP2 (input2, 3, input1, 4) < 0);
35 ASSERT (U_CMP2 (input1, 3, input2, 4) < 0);
36 ASSERT (U_CMP2 (input2, 4, input1, 3) > 0);
37 ASSERT (U_CMP2 (input1, 4, input2, 4) < 0);
38 ASSERT (U_CMP2 (input2, 4, input1, 4) > 0);
39 ASSERT (U_CMP2 (input1, 3, input2, 7) < 0);
40 ASSERT (U_CMP2 (input2, 7, input1, 3) > 0);
41 }
42 {
43 static const UNIT input1[] = { 'f', 'o', 'o' };
44 static const UNIT input2[] = { 'm', 'o', 'o' };
45 ASSERT (U_CMP2 (input1, 3, input2, 3) < 0);
46 ASSERT (U_CMP2 (input2, 3, input1, 3) > 0);
47 }
48 {
49 static const UNIT input1[] = { 'o', 'o', 'm', 'p', 'h' };
50 static const UNIT input2[] = { 'o', 'o', 'p', 's' };
51 ASSERT (U_CMP2 (input1, 5, input2, 4) < 0);
52 ASSERT (U_CMP2 (input2, 4, input1, 5) > 0);
53 }
54
55 return 0;
56 }