Force g_test_init to cooperate

Change all g_test_init calls in the testsuite
to avoid the macro, so they work regardless of
G_DISABLE_ASSERT.
This commit is contained in:
Matthias Clasen 2021-04-12 21:22:04 -04:00
parent 13ece4ee9b
commit f98353c20b
43 changed files with 43 additions and 43 deletions

View File

@ -105,7 +105,7 @@ main (int argc, char *argv[])
{
guint i;
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
for (i = 0; i < G_N_ELEMENTS (tests); i++)

View File

@ -81,7 +81,7 @@ int_free_func (int data)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
g_test_add_func ("/intarray/simple", int_array_test_simple);

View File

@ -31,7 +31,7 @@ test_set_source_big_pixbuf (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
gtk_init ();
g_test_add_func ("/drawing/set-source-big-pixbuf", test_set_source_big_pixbuf);

View File

@ -73,7 +73,7 @@ test_clipboard_basic (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
gtk_init ();

View File

@ -57,7 +57,7 @@ test_cursor_fallback (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
gtk_init ();

View File

@ -68,7 +68,7 @@ test_bad_display (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
gdk_set_allowed_backends ("x11");

View File

@ -43,7 +43,7 @@ test_set_default (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
/* Open default display */
gdk_display_open (NULL);

View File

@ -37,7 +37,7 @@ test_to_text_list (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
gtk_init ();
g_test_add_func ("/encoding/to-text-list", test_to_text_list);

View File

@ -128,7 +128,7 @@ main (int argc, char *argv[])
{
setlocale (LC_ALL, "");
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
gtk_init ();
g_test_add_func ("/keysyms/basic", test_keysyms_basic);

View File

@ -180,7 +180,7 @@ main (int argc, char *argv[])
Color color;
GEnumClass *enum_class;
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
enum_class = g_type_class_ref (GDK_TYPE_MEMORY_FORMAT);

View File

@ -33,7 +33,7 @@ test_format (gconstpointer d)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
g_test_add_data_func ("/pixbuf/format/png", "png", test_format);
g_test_add_data_func ("/pixbuf/format/jpeg", "jpeg", test_format);

View File

@ -110,7 +110,7 @@ test_rectangle_contains (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
gtk_init ();

View File

@ -159,7 +159,7 @@ test_color_parse_nonsense (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
g_test_add_func ("/rgba/parse", test_color_parse);
g_test_add_func ("/rgba/parse/nonsense", test_color_parse_nonsense);

View File

@ -127,7 +127,7 @@ test_default_seat (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
gtk_init ();

View File

@ -458,7 +458,7 @@ main (int argc, char *argv[])
{
int result;
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
create_masks ();

View File

@ -561,7 +561,7 @@ test_splice_overflow (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
g_test_add_func ("/bitset/is_empty", test_is_empty);

View File

@ -363,7 +363,7 @@ constraint_solver_paper (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
g_test_add_func ("/constraint-solver/paper", constraint_solver_paper);

View File

@ -37,7 +37,7 @@ int
main (int argc, char *argv[])
{
gtk_init ();
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
g_test_add_func ("/cssprovider/section-in-load-from-data", test_section_in_load_from_data);
g_test_add_func ("/cssprovider/load-nonexisting-file", test_section_load_nonexisting_file);

View File

@ -396,7 +396,7 @@ test_every_dispose (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
number_quark = g_quark_from_static_string ("Hell and fire was spawned to be released.");

View File

@ -467,7 +467,7 @@ add_test_for_all_models (const char *name,
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
add_test_for_all_models ("no-filter", test_no_filter);

View File

@ -379,7 +379,7 @@ test_incremental (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
number_quark = g_quark_from_static_string ("Hell and fire was spawned to be released.");

View File

@ -397,7 +397,7 @@ test_submodel_remove (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
number_quark = g_quark_from_static_string ("Hell and fire was spawned to be released.");

View File

@ -31,7 +31,7 @@ int
main (int argc, char *argv[])
{
/* Don't use gtk_test_init here because it implicitly initializes GTK. */
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
gtk_disable_setlocale();
setlocale (LC_ALL, "C");

View File

@ -289,7 +289,7 @@ test_set_map_func (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
number_quark = g_quark_from_static_string ("Hell and fire was spawned to be released.");

View File

@ -684,7 +684,7 @@ test_set_model (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
g_test_bug_base ("http://bugzilla.gnome.org/show_bug.cgi?id=%s");

View File

@ -46,7 +46,7 @@ main (int argc,
char *argv[])
{
/* Keep in sync with gtk_test_init() */
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
g_setenv ("GTK_MODULES", "", TRUE);
setlocale (LC_ALL, "C");

View File

@ -292,7 +292,7 @@ test_crash2 (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
g_test_add_func ("/rbtree/crash", test_crash);

View File

@ -514,7 +514,7 @@ int
main (int argc,
char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
g_test_add_func ("/rbtree/create", test_create);

View File

@ -134,7 +134,7 @@ int
main (int argc, char **argv)
{
gtk_init ();
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
g_test_add_func ("/sizing/revealer/slide_right_animations", slide_right_animations);
g_test_add_func ("/sizing/revealer/slide_right_no_animations", slide_right_no_animations);

View File

@ -270,7 +270,7 @@ int
main (int argc, char **argv)
{
gtk_init ();
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
g_test_add_func ("/sizing/scrolledwindow/overlay_automatic_width_min", overlay_automatic_width_min);
g_test_add_func ("/sizing/scrolledwindow/overlay_automatic_height_min", overlay_automatic_height_min);

View File

@ -709,7 +709,7 @@ test_set_model (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
number_quark = g_quark_from_static_string ("Hell and fire was spawned to be released.");

View File

@ -361,7 +361,7 @@ test_bug_skip_amount (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
number_quark = g_quark_from_static_string ("Hell and fire was spawned to be released.");

View File

@ -662,7 +662,7 @@ test_stable (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
number_quark = g_quark_from_static_string ("Like a trashcan fire in a prison cell");

View File

@ -455,7 +455,7 @@ add_test_for_all_models (const char *name,
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
add_test_for_all_models ("two-sorters", test_two_sorters);

View File

@ -537,7 +537,7 @@ test_out_of_bounds_access (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
number_quark = g_quark_from_static_string ("Hell and fire was spawned to be released.");

View File

@ -245,7 +245,7 @@ test_take (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
changes_quark = g_quark_from_static_string ("What did I see? Can I believe what I saw?");

View File

@ -50,7 +50,7 @@ main (int argc, char *argv[])
guint i;
gtk_init ();
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
for (i = 0; i < G_N_ELEMENTS (themes); i++)
{

View File

@ -245,7 +245,7 @@ test_steps (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
g_test_add_func ("/timsort/integers", test_integers);

View File

@ -255,7 +255,7 @@ test_remove_some (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
number_quark = g_quark_from_static_string ("Hell and fire was spawned to be released.");

View File

@ -251,7 +251,7 @@ test_compare_no_order (void)
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
setlocale (LC_ALL, "C");
number_quark = g_quark_from_static_string ("Like a trashcan fire in a prison cell");

View File

@ -69,7 +69,7 @@ static void test_GThemedIcon (void) { check ("GThemedIcon", "gthemed_icon_ge
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
g_test_add_func ("/builder/get-type/GtkWindow", test_GtkWindow);
g_test_add_func ("/builder/get-type/GtkHBox", test_GtkHBox);

View File

@ -89,7 +89,7 @@ window (void)
int
main (int argc, char **argv)
{
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
gtk_init ();
g_test_add_func ("/gtk/widget-refcount/popover", popover);

View File

@ -586,7 +586,7 @@ int
main (int argc, char **argv)
{
gtk_init ();
g_test_init (&argc, &argv, NULL);
(g_test_init) (&argc, &argv, NULL);
g_test_add_func ("/widgetorder/simple", simple);
g_test_add_func ("/widgetorder/two", two);