mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-28 02:20:04 +01:00
Revert "Add a test for expected messages with structured logging"
This reverts commit bc40c7a05cbd0e7c9b97ce86cccb6a4b78c2e56a. We are going to make g_test_expect_message() only work for the old logging API. https://bugzilla.gnome.org/show_bug.cgi?id=769486
This commit is contained in:
parent
5c3205f2fb
commit
2a5d9f8898
@ -368,14 +368,6 @@ test_expected_messages_warning (void)
|
||||
g_return_if_reached ();
|
||||
}
|
||||
|
||||
static void
|
||||
test_expected_messages_warning_structured (void)
|
||||
{
|
||||
g_log_structured (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING,
|
||||
"MESSAGE", "This is a %d warning", g_random_int ());
|
||||
g_return_if_reached ();
|
||||
}
|
||||
|
||||
static void
|
||||
test_expected_messages_expect_warning (void)
|
||||
{
|
||||
@ -406,20 +398,6 @@ test_expected_messages_expected (void)
|
||||
exit (0);
|
||||
}
|
||||
|
||||
static void
|
||||
test_expected_messages_structured (void)
|
||||
{
|
||||
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING,
|
||||
"This is a * warning");
|
||||
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,
|
||||
"*should not be reached");
|
||||
|
||||
test_expected_messages_warning_structured ();
|
||||
|
||||
g_test_assert_expected_messages ();
|
||||
exit (0);
|
||||
}
|
||||
|
||||
static void
|
||||
test_expected_messages_null_domain (void)
|
||||
{
|
||||
@ -491,10 +469,6 @@ test_expected_messages (void)
|
||||
g_test_trap_assert_passed ();
|
||||
g_test_trap_assert_stderr ("");
|
||||
|
||||
g_test_trap_subprocess ("/misc/expected-messages/subprocess/structured", 0, 7);
|
||||
g_test_trap_assert_passed ();
|
||||
g_test_trap_assert_stderr ("");
|
||||
|
||||
g_test_trap_subprocess ("/misc/expected-messages/subprocess/null-domain", 0, 0);
|
||||
g_test_trap_assert_passed ();
|
||||
g_test_trap_assert_stderr ("");
|
||||
@ -795,7 +769,6 @@ main (int argc,
|
||||
g_test_add_func ("/misc/expected-messages/subprocess/expect-warning", test_expected_messages_expect_warning);
|
||||
g_test_add_func ("/misc/expected-messages/subprocess/wrong-warning", test_expected_messages_wrong_warning);
|
||||
g_test_add_func ("/misc/expected-messages/subprocess/expected", test_expected_messages_expected);
|
||||
g_test_add_func ("/misc/expected-messages/subprocess/structured", test_expected_messages_structured);
|
||||
g_test_add_func ("/misc/expected-messages/subprocess/null-domain", test_expected_messages_null_domain);
|
||||
g_test_add_func ("/misc/expected-messages/subprocess/extra-warning", test_expected_messages_extra_warning);
|
||||
g_test_add_func ("/misc/expected-messages/subprocess/unexpected-extra-warning", test_expected_messages_unexpected_extra_warning);
|
||||
|
Loading…
x
Reference in New Issue
Block a user