Enable test
This commit is contained in:
parent
e7875ae0fa
commit
6f9a816786
@ -384,17 +384,6 @@ struct cpp20_only_range {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static_assert(std::input_iterator<cpp20_only_range::iterator>);
|
static_assert(std::input_iterator<cpp20_only_range::iterator>);
|
||||||
|
|
||||||
# ifdef __cpp_lib_ranges_iota
|
|
||||||
TEST(ranges_test, nested_ranges) {
|
|
||||||
auto l = std::list{1, 2, 3};
|
|
||||||
auto r = std::views::iota(0, 3) | std::views::transform([&l](auto i) {
|
|
||||||
return std::views::take(std::ranges::subrange(l), i);
|
|
||||||
}) |
|
|
||||||
std::views::transform(std::views::reverse);
|
|
||||||
EXPECT_EQ(fmt::format("{}", r), "[[], [1], [2, 1]]");
|
|
||||||
}
|
|
||||||
# endif
|
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
TEST(ranges_test, join_sentinel) {
|
TEST(ranges_test, join_sentinel) {
|
||||||
@ -433,6 +422,17 @@ TEST(ranges_test, join_range) {
|
|||||||
}
|
}
|
||||||
#endif // FMT_RANGES_TEST_ENABLE_JOIN
|
#endif // FMT_RANGES_TEST_ENABLE_JOIN
|
||||||
|
|
||||||
|
#if defined(__cpp_lib_ranges) && __cpp_lib_ranges >= 202302L
|
||||||
|
TEST(ranges_test, nested_ranges) {
|
||||||
|
auto l = std::list{1, 2, 3};
|
||||||
|
auto r = std::views::iota(0, 3) | std::views::transform([&l](auto i) {
|
||||||
|
return std::views::take(std::ranges::subrange(l), i);
|
||||||
|
}) |
|
||||||
|
std::views::transform(std::views::reverse);
|
||||||
|
EXPECT_EQ(fmt::format("{}", r), "[[], [1], [2, 1]]");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
TEST(ranges_test, is_printable) {
|
TEST(ranges_test, is_printable) {
|
||||||
using fmt::detail::is_printable;
|
using fmt::detail::is_printable;
|
||||||
EXPECT_TRUE(is_printable(0x0323));
|
EXPECT_TRUE(is_printable(0x0323));
|
||||||
|
Loading…
Reference in New Issue
Block a user