From 69c1421980ea9c5e26f51079b467be67886bcead Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 26 Mar 2011 13:21:08 +0100 Subject: [PATCH] Tests for module 'unictype/joiningtype-longname'. * modules/unictype/joiningtype-longname-tests: New file. * tests/unictype/test-joiningtype_longname.c: New file. --- ChangeLog | 4 +++ modules/unictype/joiningtype-longname-tests | 13 ++++++++++ tests/unictype/test-joiningtype_longname.c | 39 +++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 modules/unictype/joiningtype-longname-tests create mode 100644 tests/unictype/test-joiningtype_longname.c diff --git a/ChangeLog b/ChangeLog index 27a739148..e9a8da59e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2011-03-26 Bruno Haible + Tests for module 'unictype/joiningtype-longname'. + * modules/unictype/joiningtype-longname-tests: New file. + * tests/unictype/test-joiningtype_longname.c: New file. + New module 'unictype/joiningtype-longname'. * lib/unictype.in.h (uc_joiningtype_class_long_name): New declaration. * lib/unictype/joiningtype_longname.c: New file. diff --git a/modules/unictype/joiningtype-longname-tests b/modules/unictype/joiningtype-longname-tests new file mode 100644 index 000000000..6270f6aaf --- /dev/null +++ b/modules/unictype/joiningtype-longname-tests @@ -0,0 +1,13 @@ +Files: +tests/unictype/test-joiningtype_longname.c +tests/macros.h + +Depends-on: + +configure.ac: + +Makefile.am: +TESTS += test-joiningtype_longname +check_PROGRAMS += test-joiningtype_longname +test_joiningtype_longname_SOURCES = unictype/test-joiningtype_longname.c +test_joiningtype_longname_LDADD = $(LDADD) $(LIBUNISTRING) diff --git a/tests/unictype/test-joiningtype_longname.c b/tests/unictype/test-joiningtype_longname.c new file mode 100644 index 000000000..55c05b5dc --- /dev/null +++ b/tests/unictype/test-joiningtype_longname.c @@ -0,0 +1,39 @@ +/* Test the Unicode character Arabic joining type functions. + Copyright (C) 2011 Free Software Foundation, Inc. + Written by Bruno Haible , 2011. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include "unictype.h" + +#include + +#include "macros.h" + +int +main () +{ + ASSERT (strcmp (uc_joining_type_long_name (UC_JOINING_TYPE_U), "Non Joining") == 0); + ASSERT (strcmp (uc_joining_type_long_name (UC_JOINING_TYPE_T), "Transparent") == 0); + ASSERT (strcmp (uc_joining_type_long_name (UC_JOINING_TYPE_C), "Join Causing") == 0); + ASSERT (strcmp (uc_joining_type_long_name (UC_JOINING_TYPE_L), "Left Joining") == 0); + ASSERT (strcmp (uc_joining_type_long_name (UC_JOINING_TYPE_R), "Right Joining") == 0); + ASSERT (strcmp (uc_joining_type_long_name (UC_JOINING_TYPE_D), "Dual Joining") == 0); + ASSERT (uc_joining_type_long_name (-1) == NULL); + + return 0; +} -- 2.11.0