]> git.baikalelectronics.ru Git - uboot.git/commitdiff
test: Add ut_assert_nextline_empty() empty line helper
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Thu, 2 Mar 2023 03:08:24 +0000 (04:08 +0100)
committerSimon Glass <sjg@chromium.org>
Thu, 9 Mar 2023 16:50:47 +0000 (08:50 -0800)
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>
include/test/ut.h

index 4d00b4eeca1c5b6410a342f6de1e171c5ac701f4..2b0dab32f682ec47e113ab9ed42359f1901dbd39 100644 (file)
@@ -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
  *