tests: Port various tests to use g_assert_cmpvariant()

This should improve test error reporting a little.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall
2018-12-14 15:04:11 +00:00
parent 8a2fa212e7
commit d289ef449b
5 changed files with 19 additions and 30 deletions

View File

@@ -128,7 +128,7 @@ message_copy (void)
copy_val = g_dbus_message_get_header (m, m_headers[n]);
g_assert (m_val != NULL);
g_assert (copy_val != NULL);
g_assert (g_variant_equal (m_val, copy_val));
g_assert_cmpvariant (m_val, copy_val);
}
g_assert_cmpint (n, >, 0); /* make sure we actually compared headers etc. */
g_assert_cmpint (copy_headers[n], ==, 0);