test: Wrap assert macros in ({ ... }) and fix missing semicolons
Wrap the assert macros in ({ ... }) so they can be safely used both as
right side argument as well as in conditionals without curly brackets
around them. In the process, find a bunch of missing semicolons, fix
them.
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
diff --git a/test/unicode_ut.c b/test/unicode_ut.c
index 382b796..b27d711 100644
--- a/test/unicode_ut.c
+++ b/test/unicode_ut.c
@@ -192,7 +192,7 @@
if (!code)
break;
}
- ut_asserteq_ptr(s, d2 + 9)
+ ut_asserteq_ptr(s, d2 + 9);
/* Check characters less than 0x10000 */
s = d3;
@@ -203,7 +203,7 @@
if (!code)
break;
}
- ut_asserteq_ptr(s, d3 + 9)
+ ut_asserteq_ptr(s, d3 + 9);
/* Check character greater 0xffff */
s = d4;
@@ -228,7 +228,7 @@
/* Commercial at, translates to one character */
pos = buffer;
- ut_assert(!utf8_put('@', &pos))
+ ut_assert(!utf8_put('@', &pos));
ut_asserteq(1, pos - buffer);
ut_asserteq('@', buffer[0]);
ut_assert(!buffer[1]);