g_test_expect_message: add some g_return_if_fail

NULL domain is not supported and some might expect this to work, so make
sure they don't get the wrong idea...
This commit is contained in:
Ryan Lortie 2012-08-20 16:25:09 -04:00
parent 07fadc7932
commit d06c7a911e

View File

@ -1101,6 +1101,10 @@ g_test_expect_message (const gchar *log_domain,
{ {
GTestExpectedMessage *expected; GTestExpectedMessage *expected;
g_return_if_fail (log_domain != NULL);
g_return_if_fail (log_level != 0);
g_return_if_fail (pattern != NULL);
expected = g_new (GTestExpectedMessage, 1); expected = g_new (GTestExpectedMessage, 1);
expected->log_domain = g_strdup (log_domain); expected->log_domain = g_strdup (log_domain);
expected->log_level = log_level; expected->log_level = log_level;