forked from AuroraMiddleware/gtk
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:
parent
13ece4ee9b
commit
f98353c20b
@ -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++)
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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 ();
|
||||
|
||||
|
@ -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 ();
|
||||
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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 ();
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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 ();
|
||||
|
||||
|
@ -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 ();
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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.");
|
||||
|
@ -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);
|
||||
|
@ -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.");
|
||||
|
@ -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.");
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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.");
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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.");
|
||||
|
@ -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.");
|
||||
|
@ -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");
|
||||
|
@ -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);
|
||||
|
@ -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.");
|
||||
|
@ -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?");
|
||||
|
||||
|
@ -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++)
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -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.");
|
||||
|
@ -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");
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user