From 49a877764d818ffeabe065bcc37ed22fbe6b6b51 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 3 Aug 2018 13:42:38 +0100 Subject: [PATCH] testing: Clarify why incomplete tests cause g_test_failed() Signed-off-by: Simon McVittie --- glib/tests/testing.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/glib/tests/testing.c b/glib/tests/testing.c index de95f2635..0c2cf5d2a 100644 --- a/glib/tests/testing.c +++ b/glib/tests/testing.c @@ -648,7 +648,10 @@ test_incomplete (void) if (g_test_subprocess ()) { g_test_incomplete ("not done"); - g_assert (g_test_failed ()); + /* This function really means "the test concluded with a non-successful + * status" rather than "the test failed": it is documented to return + * true for skipped and incomplete tests, not just for failures. */ + g_assert_true (g_test_failed ()); return; } g_test_trap_subprocess (NULL, 0, 0);