Add test for output_iterator
This commit is contained in:
parent
d3bb13a5fd
commit
70dabdfdc4
@ -12,6 +12,7 @@
|
||||
#include <climits>
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
#include <iterator>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@ -168,6 +169,12 @@ TEST(IteratorTest, TruncatingIteratorDefaultConstruct) {
|
||||
EXPECT_EQ(it.count(), 0);
|
||||
}
|
||||
|
||||
#ifdef __cpp_lib_ranges
|
||||
TEST(IteratorTest, TruncatingIteratorOutputIterator) {
|
||||
static_assert(std::output_iterator<fmt::detail::truncating_iterator<char*>>);
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST(IteratorTest, TruncatingBackInserter) {
|
||||
std::string buffer;
|
||||
auto bi = std::back_inserter(buffer);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user