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:
Peter Jones 2012-05-27 14:26:18 +02:00 committed by Vladimir 'phcoder' Serbinenko
parent 526ef13d34
commit 2787ae53d6
4 changed files with 103 additions and 12 deletions

View file

@ -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");