tests: Use g_assert_*() instead of g_assert() in gdbus-addresses test

g_assert_*() give better failure messages, and don’t get compiled out
with G_DISABLE_ASSERT.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2019-03-15 13:46:29 +00:00
parent fd42994015
commit 132c6ba0cf

View File

@ -67,14 +67,14 @@ test_unix_address (void)
assert_not_supported_address ("some-imaginary-transport:foo=bar");
assert_is_supported_address ("unix:path=/tmp/dbus-test");
assert_is_supported_address ("unix:abstract=/tmp/dbus-another-test");
g_assert (g_dbus_is_address ("unix:foo=bar"));
g_assert_true (g_dbus_is_address ("unix:foo=bar"));
assert_not_supported_address ("unix:foo=bar");
g_assert (!g_dbus_is_address ("unix:path=/foo;abstract=/bar"));
g_assert_false (g_dbus_is_address ("unix:path=/foo;abstract=/bar"));
assert_not_supported_address ("unix:path=/foo;abstract=/bar");
assert_is_supported_address ("unix:path=/tmp/concrete;unix:abstract=/tmp/abstract");
g_assert (g_dbus_is_address ("some-imaginary-transport:foo=bar"));
g_assert_true (g_dbus_is_address ("some-imaginary-transport:foo=bar"));
g_assert (g_dbus_is_address ("some-imaginary-transport:foo=bar;unix:path=/this/is/valid"));
g_assert_true (g_dbus_is_address ("some-imaginary-transport:foo=bar;unix:path=/this/is/valid"));
assert_not_supported_address ("some-imaginary-transport:foo=bar;unix:path=/this/is/valid");
}
#endif