From: Marek Vasut <marek.vasut+renesas@mailbox.org>
Date: Thu, 2 Mar 2023 03:08:24 +0000 (+0100)
Subject: test: Add ut_assert_nextline_empty() empty line helper
X-Git-Tag: v2025.01-rc5-pxa1908~1023^2~36^2~24
X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=8f4c9993c05d22ec5ba86c9fb8526ea65b847281;p=u-boot.git

test: Add ut_assert_nextline_empty() empty line helper

Add helper macro to test for empty lines, which is an inobvious
wrapper around ut_assert_nextline("%s", "") .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

diff --git a/include/test/ut.h b/include/test/ut.h
index 4d00b4eeca..2b0dab32f6 100644
--- a/include/test/ut.h
+++ b/include/test/ut.h
@@ -334,6 +334,10 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
 		return CMD_RET_FAILURE;					\
 	}								\
 
+/* Assert that the next console output line is empty */
+#define ut_assert_nextline_empty()					\
+	ut_assert_nextline("%s", "")
+
 /**
  * ut_check_free() - Return the number of bytes free in the malloc() pool
  *