[iter] Add tests for casting to hb_iter_t<> base class for hb_sorted_array_t<>

Something's phishy about hb_sorted_array_t<>.  Can't get it work nicely with
change I'm making.  Ugh..
This commit is contained in:
Behdad Esfahbod 2019-04-24 12:19:13 -04:00
parent 714307cc43
commit 59a8fa5353
1 changed files with 6 additions and 1 deletions

View File

@ -91,7 +91,7 @@ test_iterator (Iter it)
}
template <typename Iterable,
hb_enable_if (hb_is_iterable (Iterable))>
hb_enable_if (hb_is_iterable (Iterable))>
static void
test_iterable (const Iterable &lst = Null(Iterable))
{
@ -127,6 +127,11 @@ main (int argc, char **argv)
hb_set_t st;
test_iterable (st);
hb_sorted_array_t<int> sa;
(void) static_cast<hb_iter_t<hb_sorted_array_t<int>, hb_sorted_array_t<int>::item_t>&> (sa);
(void) static_cast<hb_iter_t<hb_sorted_array_t<int>, hb_sorted_array_t<int>::__item_t__>&> (sa);
(void) static_cast<hb_iter_t<hb_sorted_array_t<int>, int&>&>(sa);
(void) static_cast<hb_iter_t<hb_sorted_array_t<int>>&>(sa);
(void) static_cast<hb_iter_t<hb_array_t<int>, int&>&> (sa);
test_iterable (sa);
test_iterable<hb_array_t<int> > ();