mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 23:13:40 +02:00
Revert "Add a test for expected messages with structured logging"
This reverts commit bc40c7a05c
.
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user