src/test-iter.cc

Branch


Log

Author Commit Date CI Message
Behdad Esfahbod 75f91987 2025-07-25T02:39:47 [src/test-*] Use hb_always_assert() which isn't compiled out under NDEBUG Part of https://github.com/harfbuzz/harfbuzz/issues/5418
Behdad Esfahbod 9027d154 2022-11-16T12:39:30 [test-iter] Fix leak
Behdad Esfahbod 0a97d27c 2022-11-15T16:23:48 [test-iter] Add another test
Behdad Esfahbod 8b379ddc 2022-07-14T16:20:04 [test-iter] Add back test of OT namespace iteration
Garret Rieger c1e280ea 2022-07-13T22:43:38 [reorg] Move Coverage, RangeRecord into new namespace layout.
Garret Rieger 071aea42 2021-11-30T16:16:06 [iter] add specialized implementation for hb_concat forward when iterators are not random access.
Garret Rieger 2e935514 2021-11-30T16:02:05 [iter] fix forward implementation in hb_concat(). Add test coverage for forward.
Garret Rieger ca227411 2021-11-30T12:53:15 [iter] add hb_concat (a, b). Iterates over a, and then over b.
Ebrahim Byagowi 2dda6dd7 2020-04-20T14:12:45 minor, tweak spacing turn 8 spaces to tab, add space before Null/Crap
Ebrahim Byagowi 0558413f 2019-10-01T13:49:55 Minor, tweak spaces
Behdad Esfahbod 67ec9fa9 2019-08-31T14:51:49 [iter] Add hb_chop()
Behdad Esfahbod 398b296f 2019-08-31T12:44:24 [iter] Add hb_len()
Behdad Esfahbod 875131d4 2019-08-31T12:42:52 [iter] Add hb_take()
Behdad Esfahbod 1f88dae9 2019-08-31T12:24:42 [iter] Make iota() accept invokable for increasing to next item
Behdad Esfahbod b1378d8a 2019-08-30T12:10:45 [iter] Add hb_repeat()
Behdad Esfahbod 78d35f0e 2019-05-15T18:15:05 Reduce captures of lambdas
Behdad Esfahbod d0df996c 2019-05-15T00:32:41 Use implicit lambda return type
Behdad Esfahbod 606841b0 2019-05-11T11:54:30 [iter] Check for more before forwarding/rewinding past ends
Behdad Esfahbod ed972d5d 2019-05-09T16:58:28 [iter] Rewrite test functions Notably, add hb_is_source_of(,) and hb_is_sink_of(,) to replace most uses of hb_is_iterator_of(,).
Behdad Esfahbod c9b287a8 2019-05-09T12:43:57 Add hb_lidentity(), and rename hb_rvalue() to hb_ridentity()
Behdad Esfahbod 57d54593 2019-05-09T11:23:41 [test-iter] Don't walk past end That's not legal.
Behdad Esfahbod 2c24ea37 2019-05-09T11:07:38 [iter] Take start value in hb_enumerate() Also rewrite it via composition.
Behdad Esfahbod 7675d0d3 2019-05-09T11:02:56 [iter] Add hb_range() hb_range() is like Python range. hb_iota() has slightly different API. Ie. it takes a start, instead of end.
Behdad Esfahbod afb013f3 2019-05-08T16:16:43 Fix msan issue hb_identity returns rvalue-reference if input is rvalue. That, can leak the reference and cause in bad access to temporaries after they are destructed. This is unfortunately unfixable given the desired transparency of hb_identity :(. Just don't use it with hb_map().
rsheeter ba605128 2019-05-08T12:09:10 [map] add a test for iteration
Behdad Esfahbod a3048271 2019-05-08T15:08:10 [map] Add .values() iterator
Behdad Esfahbod f5705d76 2019-05-08T14:46:55 Whitespace
rsheeter b827181b 2019-05-08T13:51:11 [map] tweak test-iter.cc
rsheeter 492af0f1 2019-05-08T12:47:18 [map] add keys()
Behdad Esfahbod cdb61eb0 2019-05-08T11:00:18 [iter] Accept pointer in hb_iter() and hb_iter_t()
Behdad Esfahbod c93eeba9 2019-05-08T10:56:09 [iter] Accept pointer in hb_map()
Behdad Esfahbod 50dc3e7d 2019-05-08T10:35:02 Add hb_iota()
Behdad Esfahbod 8479eb59 2019-05-08T09:48:55 [iter] Fix hb_sink() to accept rvalue
Behdad Esfahbod fe14a400 2019-05-08T09:32:19 Adjust hb_all/any/none
Behdad Esfahbod bdbfdc92 2019-05-07T22:52:43 [iter] Add value and projection to hb_all/any/none Allows for eg, checking all values equal 2: hb_all (it, 2).
Behdad Esfahbod cf61acb9 2019-05-07T22:45:01 [iter] Accept rvalues to hb_enumerate()
Behdad Esfahbod af571dbf 2019-05-07T21:39:20 [meta] Replace most hb_enable_if with hb_requires They do absolutely same thing. hb_requires is to encode constraints, whereas hb_enable_if is for more conditional enabling.
Behdad Esfahbod 025eaa3c 2019-05-07T00:05:37 [iter] Make filter/map copyable
Behdad Esfahbod 4c2fd05c 2019-05-06T19:57:15 [iter] Implement range-based for loops Part of https://github.com/harfbuzz/harfbuzz/issues/1648
Ebrahim Byagowi 92588782 2019-04-30T13:05:10 Remove space between right angle brackets now that we have C++11 (#1689)
Behdad Esfahbod 59a8fa53 2019-04-24T12:19:13 [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..
Behdad Esfahbod 12017db0 2019-04-24T09:24:38 Move test code around
Ebrahim Byagowi 64ca2ffa 2019-04-23T01:10:46 Fix clang's -Wmain complain (#1678)
Behdad Esfahbod 25dd88ef 2019-04-22T17:45:23 Err, fix hb_invoke() variadic
Behdad Esfahbod 42ab32cb 2019-04-02T18:41:33 [iter] Remove passing pointer to hb_iter() While doable with hb_deref_pointer() as well, we also would then need to do it in a ton of places. Not worth it / messy.
Behdad Esfahbod b6f29bf1 2019-04-02T18:12:01 [iter] Accept pointers in hb_iter() No idea how to avoid dupicating code. Was hoping hb_deref_pointer() would do it, but looks like a pointer can't bind to a universal reference T&&. Humm.
Ebrahim Byagowi edad6b2c 2019-04-03T00:48:59 [test][iter] minor, fix double promotion warning
Ebrahim Byagowi 062f5d6e 2019-04-02T20:27:00 [test] minor, c style comments
Ebrahim Byagowi afdbf960 2019-04-02T20:25:06 [iter][test] Add another test for hb_reduce Different initial and accumulator types
Ebrahim Byagowi b8642087 2019-04-02T00:30:06 [iter] hb_reduce, accumulator with a different type
Ebrahim Byagowi e526414c 2019-03-31T12:41:58 [iter] Implement hb_reduce
Behdad Esfahbod 78fc43f2 2019-03-31T19:17:07 [iter] Fix up build, ouch Yeah, some things not very clear...
Michiharu Ariza 294d520f 2019-03-30T13:58:22 more iter changes from master
Behdad Esfahbod e5306927 2019-03-29T23:31:07 [iter] Fix bug in hb_any() and hb_none()
Behdad Esfahbod 443db2a2 2019-03-29T10:46:44 [iter] Remove hb_len() Not planning on using it. So remove. Can add later if needed.
Behdad Esfahbod f639b9a8 2019-03-28T21:34:47 [iter] Add hb_len() function-object
Behdad Esfahbod 77060bcd 2019-02-15T16:55:08 [iter] Add hb_all, hb_any, hb_none
Behdad Esfahbod fa35d3fd 2019-02-14T14:04:05 [iter] Add hb_drain
Behdad Esfahbod 773d7563 2019-02-14T11:40:22 [iter] Add hb_apply()
Behdad Esfahbod 5fa52e62 2019-02-14T10:51:02 [iter] Accept iterator, not iterable, in hb_sink()()
Behdad Esfahbod 849a0f17 2019-01-29T17:10:19 [iter] Add hb_iter_with_fallback_t instead
Behdad Esfahbod 4d40ed9d 2019-01-29T13:55:23 [iter] Add hb_iter_with_mixin_t<>
Behdad Esfahbod 84a25d79 2019-01-29T13:39:19 [iter] Rename
Behdad Esfahbod 57795bc8 2019-01-28T16:23:12 [iter] Add operator>> and operator<<
Behdad Esfahbod 0363ce65 2019-01-27T01:03:56 [iter] Accept C arrays in hb_iter()
Behdad Esfahbod b62e7f92 2019-01-27T00:51:43 [test] Test unary operator+ "Test" as in compiles..
Behdad Esfahbod 778c96b8 2019-01-27T00:50:54 [iter] Fix hb_iter()
Behdad Esfahbod 2f5b1a91 2019-01-27T00:49:37 [iter] Add unary operator+ that returns a copy
Behdad Esfahbod fbab07f9 2019-01-27T00:44:45 [iter] Add hb_bool() and make hb_filter default to it for predicate
Behdad Esfahbod 2aff6d96 2019-01-26T22:54:25 [iter] Test that default-constructed iterators are empty
Behdad Esfahbod 090fe56d 2019-01-25T15:34:03 Merge branch 'master' into iter
Behdad Esfahbod d3976b7e 2018-12-26T18:54:27 [iter] Make them work, mostly
Behdad Esfahbod 037f735e 2018-12-28T21:09:15 [iter] Remove friend operator +, hoping to fix some bots
Behdad Esfahbod 2cbf5bf3 2018-12-27T16:55:18 [iter] Test OT::Coverage iter
Behdad Esfahbod 859a880b 2018-12-30T02:11:03 [iter] Add back operator + Too ugly to remove..
Behdad Esfahbod 3fc03e42 2019-01-08T16:33:31 [iter] Use static_assert with hb_is_random_access_iterator() Both, checks constexpr'ness, and fixes build with cra**y implementations of assert() macro: test-iter.cc:108:11: error: too many arguments provided to function-like macro invocation assert (hb_is_random_access_iterator (array_iter_t<int>)); ^ ./hb-iter.hh:186:42: note: expanded from macro 'hb_is_random_access_iterator' hb_is_random_access_iterator_of (Iter, typename Iter::item_t) ^ /usr/include/x86_64-linux-gnu/sys/cdefs.h:89:9: note: macro '__STRING' defined here \#define __STRING(x) #x ^ test-iter.cc:108:3: error: use of undeclared identifier '__STRING' assert (hb_is_random_access_iterator (array_iter_t<int>)); ^ /usr/include/assert.h:91:21: note: expanded from macro 'assert' : __assert_fail (__STRING(expr), __FILE__, __LINE__, __ASSERT_FUNCTION)) ^
Behdad Esfahbod ca6adcd1 2019-01-08T14:23:12 [iter] Test hb_is_iterable / hb_is_iterator
Behdad Esfahbod 7987095e 2019-01-09T01:02:38 [meta] Remove hb_enable_if_t It was only used for C++<11 which does not allow default parameters in function templates. Looks like we cannot support <11 anyway, so, start cleaning up.
Behdad Esfahbod 84e5d002 2019-01-08T23:57:16 [iter] Add hb_zip()
Behdad Esfahbod 636786ec 2019-01-08T23:48:35 [iter] Rename __item_type__ to __item_t__
Behdad Esfahbod 2658e40f 2019-01-08T12:53:02 [iter] Add hb_is_random_access_iterator()
Behdad Esfahbod 445364d8 2019-01-08T12:42:15 [iter] Rename hb_is_[sorted_]iterator() -> hb_is_[sorted_]iterator_of()
Behdad Esfahbod 47333c8a 2019-01-07T21:38:49 [iter] Fix operator->
Behdad Esfahbod 85969e35 2019-01-07T18:59:26 [iter] Fix test
Behdad Esfahbod 6cd96ba1 2018-12-30T20:51:31 [iter] Make is_random_access_iterator a constant We cannot rely on constexpr functions...
Behdad Esfahbod 076faf7c 2018-12-30T01:40:08 [iter] Disable operator + To see if it makes bots happy... This is frustrating.
Behdad Esfahbod 5ec11ce1 2018-12-27T17:17:28 [iter] Clarify readonly vs lvalue iterators lvalue iterators must declare __item_type__ as a reference.
Behdad Esfahbod 570473a3 2018-12-27T13:29:51 [iter] Make hb_sorted_array_t work as iter Ugly, but does the job.
Behdad Esfahbod 3dea9aff 2018-12-26T19:56:37 [iter] Test default-constructability
Behdad Esfahbod 743ff093 2018-12-26T19:54:52 [iter] Implement friend opeator + (int, iter)
Behdad Esfahbod 2ea79e03 2018-12-26T19:01:46 [iter] Minor
Behdad Esfahbod fb053b63 2018-12-26T19:01:30 [iter] Rename random_access() to constexpr is_random_access()
Behdad Esfahbod e4355b1c 2018-12-22T16:11:22 [set] Add iter_t as alias to const_iter_t
Behdad Esfahbod 2a33ab05 2018-12-21T18:49:27 [iter] Change __more__ to fallback to __len__
Behdad Esfahbod 474a1205 2018-12-21T18:46:51 [array/vector] Rename len to length
Behdad Esfahbod 2fc1860a 2018-12-21T18:09:45 [iter] Split hb_iter_t<> into hb_iter_t<> and hb_iter_mixin_t<>
Behdad Esfahbod 865deeb3 2018-12-21T17:35:58 Adjust internal header dependencies
Behdad Esfahbod 7557e348 2018-12-21T17:21:19 [iter] Move hb_fill() and hb_copy() to hb-iter.hh
Behdad Esfahbod 65e8bd56 2018-12-21T16:20:30 [iter] Fix hb_copy() return value
Behdad Esfahbod aaddfaa5 2018-12-21T16:04:38 [iter] Make hb_fill() take collection type, not iter Starting to get the hang of when take which.