summaryrefslogtreecommitdiff
path: root/test/line.cc
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2025-09-15 21:15:53 +0200
committerJoel Klinghed <the_jk@spawned.biz>2025-09-15 21:15:53 +0200
commitaa49abdf239bae6065fddd0839ec67a404c9748c (patch)
tree631fbb2df58aa35df3d60c65c037ef74b1807114 /test/line.cc
parentbf41a601fd0447bcf3a2937a595a1cd8ca5c1633 (diff)
Add .clang-format
Make it easier to keep a consistent style
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());
+ },
+ "");
}