unictype/bidi*: Rename functions.
[gnulib.git] / tests / unictype / test-bidi_byname.c
1 /* Test the Unicode character type functions.
2    Copyright (C) 2007-2011 Free Software Foundation, Inc.
3
4    This program is free software: you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation; either version 3 of the License, or
7    (at your option) any later version.
8
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
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   ASSERT (uc_bidi_class_byname ("X") < 0);
48   ASSERT (uc_bidi_class_byname ("") < 0);
49
50   return 0;
51 }