提交 9a6f9b4d 编写于 作者: G Garret Rieger 提交者: Behdad Esfahbod

[set] add a test demonstrating a bug in hb_set_union.

上级 9b4a5d7e
......@@ -137,10 +137,13 @@ test_set_algebra (void)
{
hb_set_t *s = hb_set_create ();
hb_set_t *o = hb_set_create ();
hb_set_t *o2 = hb_set_create ();
hb_set_add (o, 13);
hb_set_add (o, 19);
hb_set_add (o2, 0x660E);
test_empty (s);
g_assert (!hb_set_is_equal (s, o));
hb_set_set (s, o);
......@@ -157,6 +160,13 @@ test_set_algebra (void)
g_assert (hb_set_has (s, 10));
g_assert (hb_set_has (s, 13));
hb_set_clear (s);
test_empty (s);
g_assert_cmpint (hb_set_get_population (s), ==, 0);
hb_set_union (s, o2);
g_assert_cmpint (hb_set_get_population (s), ==, 1);
g_assert (hb_set_has (s, 0x660E));
hb_set_clear (s);
test_empty (s);
hb_set_add_range (s, 10, 17);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册