This source file includes following definitions.
- test_strcmp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 static void
20 test_strcmp (void)
21 {
22 {
23 static const UNIT input1[] = { 0 };
24 static const UNIT input2[] = { 0 };
25 ASSERT (U_STRCMP (input1, input2) == 0);
26 }
27 {
28 static const UNIT input1[] = { 0 };
29 static const UNIT input2[] = { 'f', 'o', 'o', 0 };
30 ASSERT (U_STRCMP (input1, input2) < 0);
31 ASSERT (U_STRCMP (input2, input1) > 0);
32 }
33 {
34 static const UNIT input1[] = { 'f', 'o', 'o', 0 };
35 static const UNIT input2[] = { 'f', 'o', 'o', 0 };
36 ASSERT (U_STRCMP (input1, input2) == 0);
37 }
38 {
39 static const UNIT input1[] = { 'f', 'o', 'o', 0 };
40 static const UNIT input2[] = { 'b', 'a', 'r', 0 };
41 ASSERT (U_STRCMP (input1, input2) > 0);
42 ASSERT (U_STRCMP (input2, input1) < 0);
43 }
44 {
45 static const UNIT input1[] = { 'f', 'o', 'o', 0 };
46 static const UNIT input2[] = { 'f', 'o', 'o', 'b', 'a', 'r', 0 };
47 ASSERT (U_STRCMP (input1, input2) < 0);
48 ASSERT (U_STRCMP (input2, input1) > 0);
49 }
50 {
51 static const UNIT input1[] = { 'o', 'o', 'm', 'p', 'h', 0 };
52 static const UNIT input2[] = { 'o', 'o', 'p', 's', 0 };
53 ASSERT (U_STRCMP (input1, input2) < 0);
54 ASSERT (U_STRCMP (input2, input1) > 0);
55 }
56 }