[test] Add tests for _get_empty() funcs
This commit is contained in:
parent
3994be3ded
commit
b8477e1da2
@ -52,6 +52,7 @@ test_blob_empty (void)
|
||||
|
||||
g_assert (hb_blob_is_immutable (hb_blob_get_empty ()));
|
||||
g_assert (hb_blob_get_empty () != NULL);
|
||||
g_assert (hb_blob_get_empty () == hb_blob_create (NULL, 0, HB_MEMORY_MODE_READONLY, NULL, NULL));
|
||||
|
||||
blob = hb_blob_get_empty ();
|
||||
g_assert (blob == hb_blob_get_empty ());
|
||||
|
@ -711,6 +711,12 @@ test_buffer_utf16_conversion (void)
|
||||
hb_buffer_destroy (b);
|
||||
}
|
||||
|
||||
static void
|
||||
test_buffer_empty (void)
|
||||
{
|
||||
g_assert (hb_buffer_get_empty ());
|
||||
g_assert (hb_buffer_create (-1) == hb_buffer_get_empty ());
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
@ -734,6 +740,7 @@ main (int argc, char **argv)
|
||||
hb_test_add (test_buffer_utf8_conversion);
|
||||
hb_test_add (test_buffer_utf8_validity);
|
||||
hb_test_add (test_buffer_utf16_conversion);
|
||||
hb_test_add (test_buffer_empty);
|
||||
|
||||
return hb_test_run();
|
||||
}
|
||||
|
@ -550,6 +550,15 @@ test_unicode_properties_nil (void)
|
||||
hb_unicode_funcs_destroy (uf);
|
||||
}
|
||||
|
||||
static void
|
||||
test_unicode_properties_empty (void)
|
||||
{
|
||||
hb_unicode_funcs_t *uf = hb_unicode_funcs_get_empty ();
|
||||
|
||||
g_assert (hb_unicode_funcs_is_immutable (uf));
|
||||
_test_unicode_properties_nil (uf);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
test_unicode_chainup (void)
|
||||
@ -777,6 +786,7 @@ main (int argc, char **argv)
|
||||
hb_test_init (&argc, &argv);
|
||||
|
||||
hb_test_add (test_unicode_properties_nil);
|
||||
hb_test_add (test_unicode_properties_empty);
|
||||
|
||||
hb_test_add_data_flavor (hb_unicode_funcs_get_default (), "default", test_unicode_properties);
|
||||
hb_test_add_data_flavor ((gconstpointer) script_roundtrip_default, "default", test_unicode_script_roundtrip);
|
||||
|
Loading…
Reference in New Issue
Block a user