Add a test for g_unichar_isdefined

This commit is contained in:
Matthias Clasen 2011-11-20 23:18:20 -05:00
parent 3aeddaa2d4
commit 4cbacb91de

View File

@ -343,6 +343,18 @@ test_title (void)
g_assert (g_unichar_totitle ('A') == 'A');
}
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)
{
@ -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);