tests: Better failure output for test_dconf_paths

Output whether we get an unexpected failure or success, and the values
we passed in, to make it easy to pinpoint the failing test.
This commit is contained in:
Bastien Nocera
2020-03-17 13:11:54 +01:00
parent 6395d04e40
commit a4df2bae2b

View File

@@ -1152,7 +1152,12 @@ test_dconf_paths (void)
gboolean result;
result = flatpak_dconf_path_is_similar (tests[i].path1, tests[i].path2);
g_assert_cmpint (result, ==, tests[i].result);
if (result != tests[i].result)
g_error ("Unexpected %s: flatpak_dconf_path_is_similar (%s, %s) = %d",
result ? "success" : "failure",
tests[i].path1,
tests[i].path2,
result);
}
}