diff options
author | Garret Rieger <grieger@google.com> | 2018-03-06 13:46:51 -0800 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2018-03-07 09:25:53 +0100 |
commit | 9a6f9b4d4284f0378a71a181fe216d97c913669e (patch) | |
tree | 199def64d6f661673e306c9432dde5cf58a9fabe | |
parent | 9b4a5d7ef1ec068042e3c793845a4dbc3308d4b7 (diff) |
[set] add a test demonstrating a bug in hb_set_union.
-rw-r--r-- | test/api/test-set.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/api/test-set.c b/test/api/test-set.c index 1c51e846..15958c57 100644 --- a/test/api/test-set.c +++ b/test/api/test-set.c @@ -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); @@ -159,6 +162,13 @@ test_set_algebra (void) 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); g_assert (!hb_set_is_equal (s, o)); hb_set_intersect (s, o); |