aboutsummaryrefslogtreecommitdiff
path: root/test/i2ctcp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-06-26 15:44:26 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-06-26 15:44:26 +0200
commitee5d161f6153e1f9da73e477f63f38dcf52ca10c (patch)
tree926413950f64ed7b0f45f6b3551c16446ecd08d4 /test/i2ctcp
parentc77d271d9cb86bf6893098ec6c431fc87945e6c9 (diff)
`make format`
Diffstat (limited to 'test/i2ctcp')
-rw-r--r--test/i2ctcp/main.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/i2ctcp/main.cpp b/test/i2ctcp/main.cpp
index 1f0c3ff..ca857cd 100644
--- a/test/i2ctcp/main.cpp
+++ b/test/i2ctcp/main.cpp
@@ -5,7 +5,9 @@
using std::min;
-const uint8_t data[] = { 0xff, 0x00, 0xde, 0xad, 0xbe, 0xef, };
+const uint8_t data[] = {
+ 0xff, 0x00, 0xde, 0xad, 0xbe, 0xef,
+};
const size_t data_len = sizeof(data);
const size_t chunk_size = 6;
@@ -33,14 +35,11 @@ TEST(i2ctcp, recv) {
int parsed = i2ctcp_read(&recv_msg, send_data + i, expected_size);
EXPECT_GE(parsed, 0);
- if (i + expected_size == send_size)
- EXPECT_EQ(parsed, 0);
- else
- EXPECT_GT(parsed, 0);
+ if (i + expected_size == send_size) EXPECT_EQ(parsed, 0);
+ else EXPECT_GT(parsed, 0);
}
ASSERT_NE(recv_msg.data, nullptr);
ASSERT_EQ(recv_msg.length, data_len);
ASSERT_EQ(0, memcmp(recv_msg.data, data, data_len));
}
-