From 3d6f7df42a87ef366197581cb4696c5f30c3bcbb Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Thu, 26 Oct 2017 17:54:55 +0100 Subject: [PATCH] [test] Additional coverage in test_set_iter. This adds a couple extra entries to the set used, such that iteration would fail in 1.6.2 due to the bug in hb_set_t::page_t::next(). --- test/api/test-set.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/api/test-set.c b/test/api/test-set.c index de23c55a4..b3dc35ef1 100644 --- a/test/api/test-set.c +++ b/test/api/test-set.c @@ -201,6 +201,8 @@ test_set_iter (void) hb_set_add (s, 13); hb_set_add_range (s, 6, 6); hb_set_add_range (s, 10, 15); + hb_set_add (s, 1100); + hb_set_add (s, 1200); hb_set_add (s, 20005); test_not_empty (s); @@ -218,6 +220,10 @@ test_set_iter (void) g_assert (hb_set_next (s, &next)); g_assert_cmpint (next, ==, 15); g_assert (hb_set_next (s, &next)); + g_assert_cmpint (next, ==, 1100); + g_assert (hb_set_next (s, &next)); + g_assert_cmpint (next, ==, 1200); + g_assert (hb_set_next (s, &next)); g_assert_cmpint (next, ==, 20005); g_assert (!hb_set_next (s, &next)); g_assert_cmpint (next, ==, HB_SET_VALUE_INVALID); @@ -230,6 +236,12 @@ test_set_iter (void) g_assert_cmpint (first, ==, 10); g_assert_cmpint (last, ==, 15); g_assert (hb_set_next_range (s, &first, &last)); + g_assert_cmpint (first, ==, 1100); + g_assert_cmpint (last, ==, 1100); + g_assert (hb_set_next_range (s, &first, &last)); + g_assert_cmpint (first, ==, 1200); + g_assert_cmpint (last, ==, 1200); + g_assert (hb_set_next_range (s, &first, &last)); g_assert_cmpint (first, ==, 20005); g_assert_cmpint (last, ==, 20005); g_assert (!hb_set_next_range (s, &first, &last));