Address PR#83 review
* Makes EXPECTS() fail handler a global, settable function pointer. * Fix `util::upto` for bidirectional iterators with begin==end. * Use `std::string` in error reporting with `either` in `partition_view` to correct incorrect default conversion in return value. * Correct return types for `util::range::operator[]` and `util::range::at()` * `transform_iterator` requires only iterator==sentinel test for correct sentinel behaviour. * Extend partition tests to cover: * partition views over short (length) sequences, * non-numeric partitions, * throw on validation check of non-monotonic sequence, * make_partition with short and long size sequences, short division containers. * Extend range tests to cover: * compatibility with `std::accumulate`, * correct constness of dereferences with respect to wrapped iterators, * proper type deduction for `make_range` over pointers. * Extend span tests to cover: * span creation from `std::pair`, * proper type promotion with heterogeneous bounds.
Showing
- src/util/debug.cpp 12 additions, 4 deletionssrc/util/debug.cpp
- src/util/debug.hpp 12 additions, 2 deletionssrc/util/debug.hpp
- src/util/iterutil.hpp 1 addition, 1 deletionsrc/util/iterutil.hpp
- src/util/partition.hpp 1 addition, 1 deletionsrc/util/partition.hpp
- src/util/range.hpp 37 additions, 27 deletionssrc/util/range.hpp
- src/util/span.hpp 1 addition, 1 deletionsrc/util/span.hpp
- src/util/transform.hpp 6 additions, 6 deletionssrc/util/transform.hpp
- tests/unit/test_partition.cpp 63 additions, 0 deletionstests/unit/test_partition.cpp
- tests/unit/test_range.cpp 18 additions, 0 deletionstests/unit/test_range.cpp
- tests/unit/test_span.cpp 32 additions, 0 deletionstests/unit/test_span.cpp
Please register or sign in to comment