The old code gives arguments to a printf function which can't work
correctly, and the compiler complains. * grub-core/tests/example_functional_test.c (example_test): Add missing text. * grub-core/tests/lib/test.c (add_failure): Rewrite. * include/grub/test.h (grub_test_assert_helper): New declaration. (grub_test_assert): Use grub_test_assert_helper.
This commit is contained in:
parent
526ef13d34
commit
2787ae53d6
4 changed files with 103 additions and 12 deletions
|
@ -27,7 +27,7 @@ static void
|
|||
example_test (void)
|
||||
{
|
||||
/* Check if 1st argument is true and report with default error message. */
|
||||
grub_test_assert (1 == 1);
|
||||
grub_test_assert (1 == 1, "1 equal 1 expected");
|
||||
|
||||
/* Check if 1st argument is true and report with custom error message. */
|
||||
grub_test_assert (2 == 2, "2 equal 2 expected");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue