summaryrefslogtreecommitdiff
path: root/test/line.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/line.cc')
-rw-r--r--test/line.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/line.cc b/test/line.cc
index 0f90723..71d75c5 100644
--- a/test/line.cc
+++ b/test/line.cc
@@ -1,9 +1,9 @@
-#include <gtest/gtest.h>
+#include "line.hh"
#include "io_test_helper.hh"
-#include "line.hh"
#include <cstddef>
+#include <gtest/gtest.h>
#include <limits>
#include <utility>
@@ -124,9 +124,8 @@ TEST(line, read_error_newline) {
}
TEST(line, blocky) {
- auto reader = line::open(
- io_make_max_block(io::memory("foo bar\r\nfim zam"),
- /* max_block_size */ 1));
+ auto reader = line::open(io_make_max_block(io::memory("foo bar\r\nfim zam"),
+ /* max_block_size */ 1));
auto line = reader->read();
ASSERT_TRUE(line.has_value());
EXPECT_EQ("foo bar", line.value());
@@ -139,9 +138,8 @@ TEST(line, blocky) {
}
TEST(line, blocky_newline) {
- auto reader = line::open(
- io_make_max_block(io::memory("foo bar\r\nfim zam"),
- /* max_block_size */ 8));
+ auto reader = line::open(io_make_max_block(io::memory("foo bar\r\nfim zam"),
+ /* max_block_size */ 8));
auto line = reader->read();
ASSERT_TRUE(line.has_value());
EXPECT_EQ("foo bar", line.value());
@@ -177,8 +175,10 @@ TEST(line, max_newline) {
}
TEST(line, max_line_overflow) {
- EXPECT_DEATH_IF_SUPPORTED({
- std::ignore = line::open(io::memory(""),
- std::numeric_limits<size_t>::max());
- }, "");
+ EXPECT_DEATH_IF_SUPPORTED(
+ {
+ std::ignore =
+ line::open(io::memory(""), std::numeric_limits<size_t>::max());
+ },
+ "");
}