src/hb-set-private.hh | 2 +- test/api/test-set.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-)
New commits: commit 3d6f7df42a87ef366197581cb4696c5f30c3bcbb Author: Jonathan Kew <jfkth...@gmail.com> Date: Thu Oct 26 17:54:55 2017 +0100 [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(). diff --git a/test/api/test-set.c b/test/api/test-set.c index de23c55a..b3dc35ef 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)); commit d511cfb5577a58e31d8dd4214750b0ad4efa625a Author: Jonathan Kew <jfkth...@gmail.com> Date: Thu Oct 26 15:08:29 2017 +0100 [set] Bugfix for hb_set_next diff --git a/src/hb-set-private.hh b/src/hb-set-private.hh index 0454a189..df4325af 100644 --- a/src/hb-set-private.hh +++ b/src/hb-set-private.hh @@ -95,7 +95,7 @@ struct hb_set_t goto found; for (i++; i < len (); i++) if (v[i]) - for (unsigned int j = 0; j < ELT_BITS; j++) + for (j = 0; j < ELT_BITS; j++) if (v[i] & (elt_t (1) << j)) goto found; _______________________________________________ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/harfbuzz