From 356708e34a52bbf22cafa44771ee6eeaefc8a80b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 18 Nov 2022 18:17:34 -0700 Subject: [PATCH] [test-set] Test length of iterator --- src/test-set.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test-set.cc b/src/test-set.cc index 983a15910..6678eab35 100644 --- a/src/test-set.cc +++ b/src/test-set.cc @@ -34,6 +34,7 @@ main (int argc, char **argv) hb_set_t v1 {1, 2}; hb_set_t v2 {v1}; assert (v1.get_population () == 2); + assert (hb_len (hb_iter (v1)) == 2); assert (v2.get_population () == 2); } @@ -51,6 +52,7 @@ main (int argc, char **argv) hb_set_t s {1, 2}; hb_set_t v (std::move (s)); assert (s.get_population () == 0); + assert (hb_len (hb_iter (s)) == 0); assert (v.get_population () == 2); }