From 63fed0e85b72e27049ce14c80127859b387460dd Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Tue, 11 Jun 2024 10:44:54 +0200 Subject: fix write_cmd_req_set_state --- test/pbdrv/write.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'test') diff --git a/test/pbdrv/write.cpp b/test/pbdrv/write.cpp index de7e88a..31e5d8d 100644 --- a/test/pbdrv/write.cpp +++ b/test/pbdrv/write.cpp @@ -2,17 +2,13 @@ #include "pb-write.h" -TEST(pbdrv, write) { - +TEST(pbdrv, write_cmd_req_set_state) { pbdrv_buf_t buf = pbdrv_write_cmd_req_set_state({ .header = { .sender = 0xf0, }, .state = PB_GS_PLAYING, }); - for (size_t i = 0; i < buf.size; i++) { - printf("%02x ", buf.data[i] & 0xff); - } - printf("\n"); - ASSERT_TRUE(true); + ASSERT_NE(buf.data, nullptr); + ASSERT_GE(buf.size, 0); } -- cgit v1.2.3