mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
gtestutils: Add G_TEST_SUBPROCESS_DEFAULT, G_TEST_TRAP_DEFAULT
This makes calls to test subprocesses with default behaviour more self-documenting. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
@@ -750,7 +750,7 @@ test_param_invalid_name (gconstpointer test_data)
|
||||
return;
|
||||
}
|
||||
|
||||
g_test_trap_subprocess (NULL, 0, 0);
|
||||
g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT);
|
||||
g_test_trap_assert_failed ();
|
||||
g_test_trap_assert_stderr ("*CRITICAL*g_param_spec_is_valid_name (name)*");
|
||||
}
|
||||
@@ -1395,7 +1395,8 @@ test_param_implement (void)
|
||||
test_path = g_strdup_printf ("/param/implement/subprocess/%d-%d-%d-%d",
|
||||
change_this_flag, change_this_type,
|
||||
use_this_flag, use_this_type);
|
||||
g_test_trap_subprocess (test_path, G_TIME_SPAN_SECOND, 0);
|
||||
g_test_trap_subprocess (test_path, G_TIME_SPAN_SECOND,
|
||||
G_TEST_SUBPROCESS_DEFAULT);
|
||||
g_free (test_path);
|
||||
|
||||
/* We want to ensure that any flags mismatch problems are reported first. */
|
||||
|
@@ -582,7 +582,7 @@ properties_testv_with_invalid_property_type (void)
|
||||
|
||||
g_object_unref (test_obj);
|
||||
}
|
||||
g_test_trap_subprocess (NULL, 0, 0);
|
||||
g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT);
|
||||
g_test_trap_assert_failed ();
|
||||
g_test_trap_assert_stderr ("*WARNING*foo*gint*gchararray*");
|
||||
}
|
||||
@@ -620,7 +620,7 @@ properties_testv_with_invalid_property_names (void)
|
||||
g_object_unref (test_obj);
|
||||
}
|
||||
|
||||
g_test_trap_subprocess (NULL, 0, 0);
|
||||
g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT);
|
||||
g_test_trap_assert_failed ();
|
||||
g_test_trap_assert_stderr ("*CRITICAL*g_object_new_is_valid_property*boo*");
|
||||
}
|
||||
|
@@ -1640,7 +1640,7 @@ test_lookup_invalid (void)
|
||||
return;
|
||||
}
|
||||
|
||||
g_test_trap_subprocess (NULL, 0, 0);
|
||||
g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT);
|
||||
g_test_trap_assert_failed ();
|
||||
g_test_trap_assert_stderr ("*WARNING*unable to look up invalid signal name*");
|
||||
}
|
||||
@@ -1757,7 +1757,7 @@ test_signals_invalid_name (gconstpointer test_data)
|
||||
return;
|
||||
}
|
||||
|
||||
g_test_trap_subprocess (NULL, 0, 0);
|
||||
g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT);
|
||||
g_test_trap_assert_failed ();
|
||||
g_test_trap_assert_stderr ("*CRITICAL*g_signal_is_valid_name (signal_name)*");
|
||||
}
|
||||
|
@@ -52,7 +52,8 @@ test_assert_finalize_object (void)
|
||||
|
||||
g_assert_finalize_object (obj);
|
||||
|
||||
g_test_trap_subprocess ("/assert/finalize_object/subprocess/bad", 0, 0);
|
||||
g_test_trap_subprocess ("/assert/finalize_object/subprocess/bad", 0,
|
||||
G_TEST_SUBPROCESS_DEFAULT);
|
||||
g_test_trap_assert_failed ();
|
||||
g_test_trap_assert_stderr ("*g_assert_finalize_object:*'weak_pointer' should be NULL*");
|
||||
}
|
||||
|
Reference in New Issue
Block a user