[glib] Add a test for g_unichar_isdefined
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Add a test for g_unichar_isdefined
- Date: Mon, 21 Nov 2011 06:41:20 +0000 (UTC)
commit 4cbacb91de6010c0d852979202901e70e24de790
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Nov 20 23:18:20 2011 -0500
Add a test for g_unichar_isdefined
glib/tests/unicode.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/glib/tests/unicode.c b/glib/tests/unicode.c
index 1032601..302aa2d 100644
--- a/glib/tests/unicode.c
+++ b/glib/tests/unicode.c
@@ -344,6 +344,18 @@ test_title (void)
}
static void
+test_defined (void)
+{
+ g_assert (g_unichar_isdefined (0x0903));
+ g_assert (g_unichar_isdefined (0x20DD));
+ g_assert (g_unichar_isdefined (0xA806));
+ g_assert (g_unichar_isdefined ('a'));
+ g_assert (!g_unichar_isdefined (0x10C49));
+ g_assert (!g_unichar_isdefined (0x169D));
+ g_assert (!g_unichar_isdefined (0x27CD));
+}
+
+static void
test_wide (void)
{
guint i;
@@ -647,6 +659,7 @@ main (int argc,
g_test_add_func ("/unicode/mirror", test_mirror);
g_test_add_func ("/unicode/mark", test_mark);
g_test_add_func ("/unicode/title", test_title);
+ g_test_add_func ("/unicode/defined", test_defined);
g_test_add_func ("/unicode/wide", test_wide);
g_test_add_func ("/unicode/compose", test_compose);
g_test_add_func ("/unicode/decompose", test_decompose);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]