| 12345678910111213141516171819202122232425 |
- //
- // iota_test.cxx
- // stream-test
- //
- // Created by Sam Jaffe on 4/5/23.
- //
- #include "stream/view/iota.h"
- #include "stream_helpers.h"
- #include "stream_matchers.h"
- TEST(IotaView, ConcreteHasEmpty) {
- auto range = views::iota(0, 4);
- static_assert(stream::detail::has_empty_v<decltype(range)>);
- }
- TEST(IotaView, ConcreteHasSize) {
- auto range = views::iota(0, 4);
- static_assert(stream::detail::has_size_v<decltype(range)>);
- }
- TEST(IotaView, CountsFromStartToEnd) {
- EXPECT_THAT(views::iota(0, 4), RangesEq(std::vector{0, 1, 2, 3}));
- }
|