mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
tests/clutter/conform: Default to print test logs
To change to the old behavior, pass --quiet. The aim is to be make it easier to debug issues only reproducing in the CI. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1289
This commit is contained in:
parent
050c21c24f
commit
1b2af2891f
@ -132,7 +132,7 @@ check_coords (TestState *state,
|
||||
gint y_2,
|
||||
const graphene_point3d_t *verts)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("checking that (%i,%i,%i,%i) \xe2\x89\x88 (%i,%i,%i,%i): %s\n",
|
||||
x_1, y_1, x_2, y_2,
|
||||
(int) (verts[0].x),
|
||||
@ -200,7 +200,7 @@ test_anchor_point (TestState *state)
|
||||
/* Change the anchor point with each of the gravities */
|
||||
for (i = 0; i < G_N_ELEMENTS (gravities); i++)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
{
|
||||
GEnumClass *gravity_class = g_type_class_ref (CLUTTER_TYPE_GRAVITY);
|
||||
GEnumValue *value = g_enum_get_value (gravity_class,
|
||||
@ -356,7 +356,7 @@ test_scale_center (TestState *state)
|
||||
/* Change the anchor point with each of the gravities */
|
||||
for (i = 0; i < G_N_ELEMENTS (gravities); i++)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
{
|
||||
GEnumClass *gravity_class = g_type_class_ref (CLUTTER_TYPE_GRAVITY);
|
||||
GEnumValue *value = g_enum_get_value (gravity_class,
|
||||
@ -472,7 +472,7 @@ test_rotate_center (TestState *state)
|
||||
char prop_name[] = "rotation-angle- ";
|
||||
prop_name[sizeof (prop_name) - 2] = i - CLUTTER_X_AXIS + 'x';
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Setting %s to 90 degrees\n", prop_name);
|
||||
|
||||
g_object_set (rect, prop_name, 90.0, NULL);
|
||||
@ -531,7 +531,7 @@ test_rotate_center (TestState *state)
|
||||
char prop_name[] = "rotation-angle- ";
|
||||
prop_name[sizeof (prop_name) - 2] = i - CLUTTER_X_AXIS + 'x';
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Setting %s to 90 degrees with center 10,20,0\n", prop_name);
|
||||
|
||||
clutter_actor_set_rotation (rect, i, 90.0, 10, 20, 0);
|
||||
@ -605,7 +605,7 @@ test_rotate_center (TestState *state)
|
||||
/* Try rotating the z with all of the gravities */
|
||||
for (i = 0; i < G_N_ELEMENTS (gravities); i++)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
{
|
||||
GEnumClass *gravity_class = g_type_class_ref (CLUTTER_TYPE_GRAVITY);
|
||||
GEnumValue *value = g_enum_get_value (gravity_class,
|
||||
|
@ -39,7 +39,7 @@ test_destroy_add (ClutterContainer *container,
|
||||
{
|
||||
TestDestroy *self = TEST_DESTROY (container);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Adding '%s' (type:%s)\n",
|
||||
clutter_actor_get_name (actor),
|
||||
G_OBJECT_TYPE_NAME (actor));
|
||||
@ -54,7 +54,7 @@ test_destroy_remove (ClutterContainer *container,
|
||||
{
|
||||
TestDestroy *self = TEST_DESTROY (container);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Removing '%s' (type:%s)\n",
|
||||
clutter_actor_get_name (actor),
|
||||
G_OBJECT_TYPE_NAME (actor));
|
||||
@ -81,7 +81,7 @@ test_destroy_destroy (ClutterActor *self)
|
||||
|
||||
if (test->bg != NULL)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Destroying '%s' (type:%s)\n",
|
||||
clutter_actor_get_name (test->bg),
|
||||
G_OBJECT_TYPE_NAME (test->bg));
|
||||
@ -92,7 +92,7 @@ test_destroy_destroy (ClutterActor *self)
|
||||
|
||||
if (test->label != NULL)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Destroying '%s' (type:%s)\n",
|
||||
clutter_actor_get_name (test->label),
|
||||
G_OBJECT_TYPE_NAME (test->label));
|
||||
@ -174,7 +174,7 @@ actor_destruction (void)
|
||||
g_object_add_weak_pointer (G_OBJECT (test), (gpointer *) &test);
|
||||
g_object_add_weak_pointer (G_OBJECT (child), (gpointer *) &child);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Adding external child...\n");
|
||||
|
||||
clutter_actor_set_name (child, "Child");
|
||||
@ -184,7 +184,7 @@ actor_destruction (void)
|
||||
g_signal_connect (child, "notify", G_CALLBACK (on_notify), &property_changed);
|
||||
g_signal_connect (child, "destroy", G_CALLBACK (on_destroy), &destroy_called);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Calling destroy()...\n");
|
||||
|
||||
clutter_actor_destroy (test);
|
||||
|
@ -408,7 +408,7 @@ actor_added (ClutterContainer *container,
|
||||
int *counter = data;
|
||||
ClutterActor *old_child;
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Adding actor '%s'\n", clutter_actor_get_name (child));
|
||||
|
||||
old_child = clutter_actor_get_child_at_index (actor, 0);
|
||||
@ -425,7 +425,7 @@ actor_removed (ClutterContainer *container,
|
||||
{
|
||||
int *counter = data;
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Removing actor '%s'\n", clutter_actor_get_name (child));
|
||||
|
||||
*counter += 1;
|
||||
|
@ -15,7 +15,7 @@ actor_initial_state (void)
|
||||
g_object_ref_sink (actor);
|
||||
g_object_add_weak_pointer (G_OBJECT (actor), (gpointer *) &actor);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("initial state - visible: %s, realized: %s, mapped: %s\n",
|
||||
CLUTTER_ACTOR_IS_VISIBLE (actor) ? "yes" : "no",
|
||||
CLUTTER_ACTOR_IS_REALIZED (actor) ? "yes" : "no",
|
||||
@ -40,7 +40,7 @@ actor_shown_not_parented (void)
|
||||
|
||||
clutter_actor_show (actor);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("show without a parent - visible: %s, realized: %s, mapped: %s\n",
|
||||
CLUTTER_ACTOR_IS_VISIBLE (actor) ? "yes" : "no",
|
||||
CLUTTER_ACTOR_IS_REALIZED (actor) ? "yes" : "no",
|
||||
@ -92,7 +92,7 @@ actor_mapped (void)
|
||||
|
||||
clutter_actor_add_child (stage, actor);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("adding to a container should map - "
|
||||
"visible: %s, realized: %s, mapped: %s\n",
|
||||
CLUTTER_ACTOR_IS_VISIBLE (actor) ? "yes" : "no",
|
||||
@ -105,7 +105,7 @@ actor_mapped (void)
|
||||
|
||||
clutter_actor_hide (actor);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("hiding should unmap - "
|
||||
"visible: %s, realized: %s, mapped: %s\n",
|
||||
CLUTTER_ACTOR_IS_VISIBLE (actor) ? "yes" : "no",
|
||||
|
@ -40,7 +40,7 @@ actor_iter_traverse_children (void)
|
||||
g_assert (CLUTTER_IS_ACTOR (child));
|
||||
g_assert (clutter_actor_get_parent (child) == actor);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("actor %d = '%s'\n", i, clutter_actor_get_name (child));
|
||||
|
||||
if (i == 0)
|
||||
@ -63,7 +63,7 @@ actor_iter_traverse_children (void)
|
||||
g_assert (CLUTTER_IS_ACTOR (child));
|
||||
g_assert (clutter_actor_get_parent (child) == actor);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("actor %d = '%s'\n", i, clutter_actor_get_name (child));
|
||||
|
||||
if (i == 0)
|
||||
@ -115,7 +115,7 @@ actor_iter_traverse_remove (void)
|
||||
g_assert (CLUTTER_IS_ACTOR (child));
|
||||
g_assert (clutter_actor_get_parent (child) == actor);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("actor %d = '%s'\n", i, clutter_actor_get_name (child));
|
||||
|
||||
if (i == 0)
|
||||
@ -176,7 +176,7 @@ actor_iter_assignment (void)
|
||||
g_assert (CLUTTER_IS_ACTOR (child));
|
||||
g_assert (clutter_actor_get_parent (child) == actor);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("actor %2d = '%s'\n", i, clutter_actor_get_name (child));
|
||||
|
||||
if (i == 0)
|
||||
@ -196,7 +196,7 @@ actor_iter_assignment (void)
|
||||
{
|
||||
g_assert (clutter_actor_get_parent (child) == actor);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("actor %2d = '%s'\n", i, clutter_actor_get_name (child));
|
||||
|
||||
if (i == n_actors - 1)
|
||||
|
@ -16,7 +16,7 @@ opacity_label (void)
|
||||
label = clutter_text_new_with_text ("Sans 18px", "Label, 50% opacity");
|
||||
clutter_text_set_color (CLUTTER_TEXT (label), &label_color);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("label 50%%.get_color()/1\n");
|
||||
clutter_text_get_color (CLUTTER_TEXT (label), &color_check);
|
||||
g_assert (color_check.alpha == label_color.alpha);
|
||||
@ -24,16 +24,16 @@ opacity_label (void)
|
||||
clutter_actor_add_child (stage, label);
|
||||
clutter_actor_set_position (label, 10, 10);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("label 50%%.get_color()/2\n");
|
||||
clutter_text_get_color (CLUTTER_TEXT (label), &color_check);
|
||||
g_assert (color_check.alpha == label_color.alpha);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("label 50%%.get_paint_opacity()/1\n");
|
||||
g_assert (clutter_actor_get_paint_opacity (label) == 255);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("label 50%%.get_paint_opacity()/2\n");
|
||||
clutter_actor_set_opacity (label, 128);
|
||||
g_assert (clutter_actor_get_paint_opacity (label) == 128);
|
||||
@ -54,19 +54,19 @@ opacity_rectangle (void)
|
||||
clutter_actor_set_size (rect, 128, 128);
|
||||
clutter_actor_set_position (rect, 150, 90);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("rect 100%%.get_color()/1\n");
|
||||
clutter_rectangle_get_color (CLUTTER_RECTANGLE (rect), &color_check);
|
||||
g_assert (color_check.alpha == rect_color.alpha);
|
||||
|
||||
clutter_actor_add_child (stage, rect);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("rect 100%%.get_color()/2\n");
|
||||
clutter_rectangle_get_color (CLUTTER_RECTANGLE (rect), &color_check);
|
||||
g_assert (color_check.alpha == rect_color.alpha);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("rect 100%%.get_paint_opacity()\n");
|
||||
g_assert (clutter_actor_get_paint_opacity (rect) == 255);
|
||||
}
|
||||
@ -93,19 +93,19 @@ opacity_paint (void)
|
||||
label = clutter_text_new_with_text ("Sans 18px", "Label+Group, 25% opacity");
|
||||
clutter_text_set_color (CLUTTER_TEXT (label), &label_color);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("label 50%% + group 50%%.get_color()/1\n");
|
||||
clutter_text_get_color (CLUTTER_TEXT (label), &color_check);
|
||||
g_assert (color_check.alpha == label_color.alpha);
|
||||
|
||||
clutter_container_add (CLUTTER_CONTAINER (group1), label, NULL);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("label 50%% + group 50%%.get_color()/2\n");
|
||||
clutter_text_get_color (CLUTTER_TEXT (label), &color_check);
|
||||
g_assert (color_check.alpha == label_color.alpha);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("label 50%% + group 50%%.get_paint_opacity() = 128\n");
|
||||
g_assert (clutter_actor_get_paint_opacity (label) == 128);
|
||||
|
||||
@ -118,19 +118,19 @@ opacity_paint (void)
|
||||
rect = clutter_rectangle_new_with_color (&rect_color);
|
||||
clutter_actor_set_size (rect, 128, 128);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("rect 100%% + group 100%% + group 50%%.get_color()/1\n");
|
||||
clutter_rectangle_get_color (CLUTTER_RECTANGLE (rect), &color_check);
|
||||
g_assert (color_check.alpha == rect_color.alpha);
|
||||
|
||||
clutter_container_add (CLUTTER_CONTAINER (group2), rect, NULL);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("rect 100%% + group 100%% + group 50%%.get_color()/2\n");
|
||||
clutter_rectangle_get_color (CLUTTER_RECTANGLE (rect), &color_check);
|
||||
g_assert (color_check.alpha == rect_color.alpha);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("rect 100%%.get_paint_opacity()\n");
|
||||
g_assert (clutter_actor_get_paint_opacity (rect) == 128);
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ on_timeout (gpointer data)
|
||||
{
|
||||
if (test_num == 0)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("No covering actor:\n");
|
||||
}
|
||||
if (test_num == 1)
|
||||
@ -62,7 +62,7 @@ on_timeout (gpointer data)
|
||||
clutter_actor_add_child (state->stage, over_actor);
|
||||
clutter_actor_hide (over_actor);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Invisible covering actor:\n");
|
||||
}
|
||||
else if (test_num == 2)
|
||||
@ -84,7 +84,7 @@ on_timeout (gpointer data)
|
||||
*/
|
||||
clutter_actor_allocate (over_actor, &over_actor_box);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Clipped covering actor:\n");
|
||||
}
|
||||
else if (test_num == 3)
|
||||
@ -98,7 +98,7 @@ on_timeout (gpointer data)
|
||||
"blur",
|
||||
clutter_blur_effect_new ());
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("With blur effect:\n");
|
||||
}
|
||||
|
||||
@ -121,13 +121,13 @@ on_timeout (gpointer data)
|
||||
y * state->actor_height
|
||||
+ state->actor_height / 2);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("% 3i,% 3i / %p -> ",
|
||||
x, y, state->actors[y * ACTORS_X + x]);
|
||||
|
||||
if (actor == NULL)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("NULL: FAIL\n");
|
||||
}
|
||||
else if (actor == over_actor)
|
||||
@ -137,7 +137,7 @@ on_timeout (gpointer data)
|
||||
&& y >= 2 && y < ACTORS_Y - 2)
|
||||
pass = TRUE;
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("over_actor: %s\n", pass ? "pass" : "FAIL");
|
||||
}
|
||||
else
|
||||
@ -148,7 +148,7 @@ on_timeout (gpointer data)
|
||||
|| y < 2 || y >= ACTORS_Y - 2))
|
||||
pass = TRUE;
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("%p: %s\n", actor, pass ? "pass" : "FAIL");
|
||||
}
|
||||
|
||||
@ -206,7 +206,7 @@ actor_pick (void)
|
||||
|
||||
clutter_main ();
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
{
|
||||
if (!state.pass)
|
||||
g_test_message ("Failed pass: %s[%d], actor index: %d [%p]\n",
|
||||
|
@ -91,7 +91,7 @@ actor_preferred_size (void)
|
||||
test = g_object_new (TEST_TYPE_ACTOR, NULL);
|
||||
self = (TestActor *) test;
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Preferred size\n");
|
||||
|
||||
clutter_actor_get_preferred_size (test,
|
||||
@ -105,7 +105,7 @@ actor_preferred_size (void)
|
||||
g_assert_cmpfloat (nat_width, ==, min_width);
|
||||
g_assert_cmpfloat (nat_height, ==, min_height);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Preferred width\n");
|
||||
self->preferred_width_called = FALSE;
|
||||
clutter_actor_get_preferred_width (test, 10, &min_width, &nat_width);
|
||||
@ -113,7 +113,7 @@ actor_preferred_size (void)
|
||||
g_assert_cmpfloat (min_width, ==, 10);
|
||||
g_assert_cmpfloat (nat_width, ==, 100);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Preferred height\n");
|
||||
self->preferred_height_called = FALSE;
|
||||
clutter_actor_get_preferred_height (test, 200, &min_height, &nat_height);
|
||||
@ -121,7 +121,7 @@ actor_preferred_size (void)
|
||||
g_assert_cmpfloat (min_height, !=, 10);
|
||||
g_assert_cmpfloat (nat_height, ==, 100);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Preferred width (cached)\n");
|
||||
self->preferred_width_called = FALSE;
|
||||
clutter_actor_get_preferred_width (test, 10, &min_width, &nat_width);
|
||||
@ -129,7 +129,7 @@ actor_preferred_size (void)
|
||||
g_assert_cmpfloat (min_width, ==, 10);
|
||||
g_assert_cmpfloat (nat_width, ==, 100);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Preferred height (cache eviction)\n");
|
||||
self->preferred_height_called = FALSE;
|
||||
clutter_actor_get_preferred_height (test, 10, &min_height, &nat_height);
|
||||
@ -152,7 +152,7 @@ actor_fixed_size (void)
|
||||
rect = clutter_actor_new ();
|
||||
g_object_ref_sink (rect);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Initial size is 0\n");
|
||||
|
||||
g_assert_cmpfloat (clutter_actor_get_width (rect), ==, 0);
|
||||
@ -160,7 +160,7 @@ actor_fixed_size (void)
|
||||
|
||||
clutter_actor_set_size (rect, 100, 100);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Explicit size set\n");
|
||||
|
||||
g_assert_cmpfloat (clutter_actor_get_width (rect), ==, 100);
|
||||
@ -173,7 +173,7 @@ actor_fixed_size (void)
|
||||
"natural-height-set", &nat_height_set,
|
||||
NULL);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Notification properties\n");
|
||||
|
||||
g_assert (min_width_set && nat_width_set);
|
||||
@ -183,7 +183,7 @@ actor_fixed_size (void)
|
||||
&min_width, &min_height,
|
||||
&nat_width, &nat_height);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Preferred size\n");
|
||||
|
||||
g_assert_cmpfloat (min_width, ==, 100);
|
||||
@ -193,7 +193,7 @@ actor_fixed_size (void)
|
||||
|
||||
clutter_actor_set_size (rect, -1, -1);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Explicit size unset\n");
|
||||
|
||||
g_object_get (G_OBJECT (rect),
|
||||
|
@ -107,7 +107,7 @@ check_result (CallbackData *data)
|
||||
|
||||
if (g_strcmp0 (expected_text, text) != 0)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("text value differs %s vs %s\n", expected_text, text);
|
||||
fail = TRUE;
|
||||
}
|
||||
@ -116,7 +116,7 @@ check_result (CallbackData *data)
|
||||
expected_char = g_utf8_get_char (g_utf8_offset_to_pointer (text, data->offset));
|
||||
if (expected_char != unichar)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("text af offset differs\n");
|
||||
fail = TRUE;
|
||||
}
|
||||
@ -125,25 +125,25 @@ check_result (CallbackData *data)
|
||||
ATK_XY_WINDOW);
|
||||
if (x != data->extents_x)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("extents x position at index 0 differs (current value=%d)\n", x);
|
||||
fail = TRUE;
|
||||
}
|
||||
if (y != data->extents_y)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("extents y position at index 0 differs (current value=%d)\n", y);
|
||||
fail = TRUE;
|
||||
}
|
||||
if (width != data->extents_width)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("extents width at index 0 differs (current value=%d)\n", width);
|
||||
fail = TRUE;
|
||||
}
|
||||
if (height != data->extents_height)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("extents height at index 0 differs (current value=%d)\n", height);
|
||||
fail = TRUE;
|
||||
}
|
||||
@ -151,7 +151,7 @@ check_result (CallbackData *data)
|
||||
pos = atk_text_get_offset_at_point (cally_text, x, y, ATK_XY_WINDOW);
|
||||
if (pos != data->offset)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("offset at position (%d, %d) differs (current value=%d)\n", x,
|
||||
y, pos);
|
||||
fail = TRUE;
|
||||
@ -161,20 +161,20 @@ check_result (CallbackData *data)
|
||||
&start, &end);
|
||||
if (start != 0)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("run attributes start offset is not 0: %d\n", start);
|
||||
fail = TRUE;
|
||||
}
|
||||
if (end != g_utf8_strlen (text, -1))
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("run attributes end offset is not text length: %d\n", end);
|
||||
fail = TRUE;
|
||||
}
|
||||
|
||||
attrs = (GSList*) at_set;
|
||||
fail = compare_lists (attrs, data->run_attributes);
|
||||
if (fail && g_test_verbose ())
|
||||
if (fail && !g_test_quiet ())
|
||||
{
|
||||
g_print ("run attributes mismatch\n");
|
||||
dump_attribute_set (attrs);
|
||||
@ -183,7 +183,7 @@ check_result (CallbackData *data)
|
||||
at_set = atk_text_get_default_attributes (cally_text);
|
||||
attrs = (GSList*) at_set;
|
||||
fail = compare_lists (attrs, data->default_attributes);
|
||||
if (fail && g_test_verbose ())
|
||||
if (fail && !g_test_quiet ())
|
||||
{
|
||||
g_print ("default attributes mismatch\n");
|
||||
dump_attribute_set (attrs);
|
||||
@ -194,11 +194,11 @@ check_result (CallbackData *data)
|
||||
|
||||
if (fail)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("FAIL\n");
|
||||
data->test_failed = TRUE;
|
||||
}
|
||||
else if (g_test_verbose ())
|
||||
else if (!g_test_quiet ())
|
||||
g_print ("pass\n");
|
||||
|
||||
return fail;
|
||||
@ -319,10 +319,10 @@ cally_text (void)
|
||||
|
||||
clutter_actor_destroy (data.stage);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("\nOverall result: ");
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
{
|
||||
if (data.test_failed)
|
||||
g_print ("FAIL\n");
|
||||
|
@ -18,7 +18,7 @@ color_hls_roundtrip (void)
|
||||
g_assert_cmpfloat (hue, ==, 0.0);
|
||||
g_assert (luminance >= 0.0 && luminance <= 1.0);
|
||||
g_assert_cmpfloat (saturation, ==, 0.0);
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
{
|
||||
g_print ("RGB = { %x, %x, %x }, HLS = { %.2f, %.2f, %.2f }\n",
|
||||
color.red,
|
||||
@ -48,7 +48,7 @@ color_hls_roundtrip (void)
|
||||
g_assert (hue >= 0.0 && hue < 360.0);
|
||||
g_assert (luminance >= 0.0 && luminance <= 1.0);
|
||||
g_assert (saturation >= 0.0 && saturation <= 1.0);
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
{
|
||||
g_print ("RGB = { %x, %x, %x }, HLS = { %.2f, %.2f, %.2f }\n",
|
||||
color.red,
|
||||
@ -92,7 +92,7 @@ color_from_string_valid (void)
|
||||
ClutterColor color;
|
||||
|
||||
g_assert (clutter_color_from_string (&color, "#ff0000ff"));
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
{
|
||||
g_print ("color = { %x, %x, %x, %x }, expected = { 0xff, 0, 0, 0xff }\n",
|
||||
color.red,
|
||||
@ -106,7 +106,7 @@ color_from_string_valid (void)
|
||||
g_assert_cmpuint (color.alpha, ==, 0xff);
|
||||
|
||||
g_assert (clutter_color_from_string (&color, "#0f0f"));
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
{
|
||||
g_print ("color = { %x, %x, %x, %x }, expected = { 0, 0xff, 0, 0xff }\n",
|
||||
color.red,
|
||||
@ -120,7 +120,7 @@ color_from_string_valid (void)
|
||||
g_assert_cmpuint (color.alpha, ==, 0xff);
|
||||
|
||||
g_assert (clutter_color_from_string (&color, "#0000ff"));
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
{
|
||||
g_print ("color = { %x, %x, %x, %x }, expected = { 0, 0, 0xff, 0xff }\n",
|
||||
color.red,
|
||||
@ -134,7 +134,7 @@ color_from_string_valid (void)
|
||||
g_assert_cmpuint (color.alpha, ==, 0xff);
|
||||
|
||||
g_assert (clutter_color_from_string (&color, "#abc"));
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
{
|
||||
g_print ("color = { %x, %x, %x, %x }, expected = { 0xaa, 0xbb, 0xcc, 0xff }\n",
|
||||
color.red,
|
||||
@ -148,7 +148,7 @@ color_from_string_valid (void)
|
||||
g_assert_cmpuint (color.alpha, ==, 0xff);
|
||||
|
||||
g_assert (clutter_color_from_string (&color, "#123abc"));
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
{
|
||||
g_print ("color = { %x, %x, %x, %x }, expected = { 0x12, 0x3a, 0xbc, 0xff }\n",
|
||||
color.red,
|
||||
@ -162,7 +162,7 @@ color_from_string_valid (void)
|
||||
g_assert (color.alpha == 0xff);
|
||||
|
||||
g_assert (clutter_color_from_string (&color, "rgb(255, 128, 64)"));
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
{
|
||||
g_print ("color = { %x, %x, %x, %x }, expected = { 255, 128, 64, 255 }\n",
|
||||
color.red,
|
||||
@ -176,7 +176,7 @@ color_from_string_valid (void)
|
||||
g_assert_cmpuint (color.alpha, ==, 255);
|
||||
|
||||
g_assert (clutter_color_from_string (&color, "rgba ( 30%, 0, 25%, 0.5 ) "));
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
{
|
||||
g_print ("color = { %x, %x, %x, %x }, expected = { %.1f, 0, %.1f, 128 }\n",
|
||||
color.red,
|
||||
@ -192,7 +192,7 @@ color_from_string_valid (void)
|
||||
g_assert_cmpuint (color.alpha, ==, 127);
|
||||
|
||||
g_assert (clutter_color_from_string (&color, "rgb( 50%, -50%, 150% )"));
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
{
|
||||
g_print ("color = { %x, %x, %x, %x }, expected = { 127, 0, 255, 255 }\n",
|
||||
color.red,
|
||||
@ -206,7 +206,7 @@ color_from_string_valid (void)
|
||||
g_assert_cmpuint (color.alpha, ==, 255);
|
||||
|
||||
g_assert (clutter_color_from_string (&color, "hsl( 0, 100%, 50% )"));
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
{
|
||||
g_print ("color = { %x, %x, %x, %x }, expected = { 255, 0, 0, 255 }\n",
|
||||
color.red,
|
||||
@ -222,7 +222,7 @@ color_from_string_valid (void)
|
||||
g_assert (clutter_color_from_string (&color, "hsl( 0, 100%, 50% )"));
|
||||
|
||||
g_assert (clutter_color_from_string (&color, "hsla( 0, 100%, 50%, 0.5 )"));
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
{
|
||||
g_print ("color = { %x, %x, %x, %x }, expected = { 255, 0, 0, 127 }\n",
|
||||
color.red,
|
||||
@ -274,7 +274,7 @@ color_operators (void)
|
||||
g_assert_cmpuint (op2.blue, ==, 0);
|
||||
g_assert_cmpuint (op2.alpha, ==, 0xff);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Adding %x, %x; expected result: %x\n",
|
||||
clutter_color_to_pixel (&op1),
|
||||
clutter_color_to_pixel (&op2),
|
||||
@ -283,7 +283,7 @@ color_operators (void)
|
||||
clutter_color_add (&op1, &op2, &res);
|
||||
g_assert_cmpuint (clutter_color_to_pixel (&res), ==, 0xffff00ff);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Checking alpha channel on color add\n");
|
||||
|
||||
op1.alpha = 0xdd;
|
||||
@ -294,7 +294,7 @@ color_operators (void)
|
||||
clutter_color_from_pixel (&op1, 0xffffffff);
|
||||
clutter_color_from_pixel (&op2, 0xff00ffff);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Subtracting %x, %x; expected result: %x\n",
|
||||
clutter_color_to_pixel (&op1),
|
||||
clutter_color_to_pixel (&op2),
|
||||
@ -303,7 +303,7 @@ color_operators (void)
|
||||
clutter_color_subtract (&op1, &op2, &res);
|
||||
g_assert_cmpuint (clutter_color_to_pixel (&res), ==, 0x00ff00ff);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Checking alpha channel on color subtract\n");
|
||||
|
||||
op1.alpha = 0xdd;
|
||||
|
@ -81,21 +81,21 @@ interval_from_script (void)
|
||||
"test-script-interval.json",
|
||||
NULL);
|
||||
clutter_script_load_from_file (script, test_file, &error);
|
||||
if (g_test_verbose () && error)
|
||||
if (!g_test_quiet () && error)
|
||||
g_printerr ("\tError: %s", error->message);
|
||||
|
||||
g_assert_no_error (error);
|
||||
|
||||
interval = CLUTTER_INTERVAL (clutter_script_get_object (script, "int-1"));
|
||||
initial = clutter_interval_peek_initial_value (interval);
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_test_message ("\tinitial ['%s'] = '%.2f'",
|
||||
g_type_name (G_VALUE_TYPE (initial)),
|
||||
g_value_get_float (initial));
|
||||
g_assert (G_VALUE_HOLDS (initial, G_TYPE_FLOAT));
|
||||
g_assert_cmpfloat (g_value_get_float (initial), ==, 23.3f);
|
||||
final = clutter_interval_peek_final_value (interval);
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_test_message ("\tfinal ['%s'] = '%.2f'",
|
||||
g_type_name (G_VALUE_TYPE (final)),
|
||||
g_value_get_float (final));
|
||||
|
@ -556,7 +556,7 @@ path_test_get_length (CallbackData *data)
|
||||
|
||||
if (!(fabs (approx_length - 46340.f) / 46340.f <= 0.15f))
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("M 0 0 L 46340 0 - Expected 46340, got %d instead.", approx_length);
|
||||
|
||||
return FALSE;
|
||||
@ -567,7 +567,7 @@ path_test_get_length (CallbackData *data)
|
||||
|
||||
if (!(fabs (approx_length - 46341.f) / 46341.f <= 0.15f))
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("M 0 0 L 46341 0 - Expected 46341, got %d instead.", approx_length);
|
||||
|
||||
return FALSE;
|
||||
@ -580,7 +580,7 @@ path_test_get_length (CallbackData *data)
|
||||
/* Allow 15% margin of error */
|
||||
if (!(fabs (approx_length - actual_length) / (float) actual_length <= 0.15f))
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Expected %g, got %d instead.\n", actual_length, approx_length);
|
||||
|
||||
return FALSE;
|
||||
@ -724,12 +724,12 @@ path_base (TestConformSimpleFixture *fixture,
|
||||
{
|
||||
gboolean succeeded;
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("%s... ", path_tests[i].desc);
|
||||
|
||||
succeeded = path_tests[i].func (&data) && compare_nodes (&data);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("%s\n", succeeded ? "ok" : "FAIL");
|
||||
|
||||
g_assert (succeeded);
|
||||
|
@ -131,7 +131,7 @@ script_child (void)
|
||||
|
||||
test_file = g_test_build_filename (G_TEST_DIST, "scripts", "test-script-child.json", NULL);
|
||||
clutter_script_load_from_file (script, test_file, &error);
|
||||
if (g_test_verbose () && error)
|
||||
if (!g_test_quiet () && error)
|
||||
g_print ("Error: %s", error->message);
|
||||
|
||||
g_assert_no_error (error);
|
||||
@ -177,7 +177,7 @@ script_single (void)
|
||||
|
||||
test_file = g_test_build_filename (G_TEST_DIST, "scripts", "test-script-single.json", NULL);
|
||||
clutter_script_load_from_file (script, test_file, &error);
|
||||
if (g_test_verbose () && error)
|
||||
if (!g_test_quiet () && error)
|
||||
g_print ("Error: %s", error->message);
|
||||
|
||||
g_assert_no_error (error);
|
||||
@ -209,7 +209,7 @@ script_object_property (void)
|
||||
|
||||
test_file = g_test_build_filename (G_TEST_DIST, "scripts", "test-script-object-property.json", NULL);
|
||||
clutter_script_load_from_file (script, test_file, &error);
|
||||
if (g_test_verbose () && error)
|
||||
if (!g_test_quiet () && error)
|
||||
g_print ("Error: %s", error->message);
|
||||
|
||||
g_assert_no_error (error);
|
||||
@ -235,7 +235,7 @@ script_named_object (void)
|
||||
|
||||
test_file = g_test_build_filename (G_TEST_DIST, "scripts", "test-script-named-object.json", NULL);
|
||||
clutter_script_load_from_file (script, test_file, &error);
|
||||
if (g_test_verbose () && error)
|
||||
if (!g_test_quiet () && error)
|
||||
g_print ("Error: %s", error->message);
|
||||
|
||||
g_assert_no_error (error);
|
||||
@ -261,7 +261,7 @@ script_margin (void)
|
||||
|
||||
test_file = g_test_build_filename (G_TEST_DIST, "scripts", "test-script-margin.json", NULL);
|
||||
clutter_script_load_from_file (script, test_file, &error);
|
||||
if (g_test_verbose () && error)
|
||||
if (!g_test_quiet () && error)
|
||||
g_print ("Error: %s", error->message);
|
||||
|
||||
g_assert_no_error (error);
|
||||
|
@ -68,7 +68,7 @@ check_result (CallbackData *data, const char *note,
|
||||
PangoRectangle test_extents;
|
||||
gboolean fail = FALSE;
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("%s: ", note);
|
||||
|
||||
/* Force a redraw to get the on_paint handler to run */
|
||||
@ -79,7 +79,7 @@ check_result (CallbackData *data, const char *note,
|
||||
pango_layout_get_extents (data->test_layout, NULL, &test_extents);
|
||||
if (memcmp (&test_extents, &data->label_extents, sizeof (PangoRectangle)))
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("extents are different: expected: %d, %d, %d, %d "
|
||||
"-> text: %d, %d, %d, %d\n",
|
||||
test_extents.x / 1024,
|
||||
@ -95,18 +95,18 @@ check_result (CallbackData *data, const char *note,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("extents are the same, ");
|
||||
}
|
||||
|
||||
if (data->layout_changed)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("layout changed, ");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("layout did not change, ");
|
||||
}
|
||||
|
||||
@ -115,14 +115,14 @@ check_result (CallbackData *data, const char *note,
|
||||
|
||||
if (fail)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("FAIL\n");
|
||||
|
||||
data->test_failed = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("pass\n");
|
||||
}
|
||||
|
||||
@ -283,10 +283,10 @@ text_cache (void)
|
||||
|
||||
clutter_actor_destroy (data.stage);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("\nOverall result: ");
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
{
|
||||
if (data.test_failed)
|
||||
g_print ("FAIL\n");
|
||||
|
@ -214,12 +214,12 @@ text_delete_chars (void)
|
||||
for (j = 0; j < 4; j++)
|
||||
clutter_text_insert_unichar (text, t->unichar);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("text: %s\n", clutter_text_get_text (text));
|
||||
|
||||
clutter_text_set_cursor_position (text, 2);
|
||||
clutter_text_delete_chars (text, 1);
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("text: %s (cursor at: %d)\n",
|
||||
clutter_text_get_text (text),
|
||||
clutter_text_get_cursor_position (text));
|
||||
@ -229,7 +229,7 @@ text_delete_chars (void)
|
||||
|
||||
clutter_text_set_cursor_position (text, 2);
|
||||
clutter_text_delete_chars (text, 1);
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("text: %s (cursor at: %d)\n",
|
||||
clutter_text_get_text (text),
|
||||
clutter_text_get_cursor_position (text));
|
||||
@ -503,7 +503,7 @@ text_idempotent_use_markup (void)
|
||||
int bar_end_index = bar_start_index + strlen ("bar");
|
||||
|
||||
/* case 1: text -> use_markup */
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("text: '%s' -> use-markup: TRUE\n", contents);
|
||||
|
||||
text = g_object_new (CLUTTER_TYPE_TEXT,
|
||||
@ -511,7 +511,7 @@ text_idempotent_use_markup (void)
|
||||
NULL);
|
||||
g_object_ref_sink (text);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Contents: '%s' (expected: '%s')\n",
|
||||
clutter_text_get_text (text),
|
||||
display);
|
||||
@ -526,14 +526,14 @@ text_idempotent_use_markup (void)
|
||||
clutter_actor_destroy (CLUTTER_ACTOR (text));
|
||||
|
||||
/* case 2: use_markup -> text */
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("use-markup: TRUE -> text: '%s'\n", contents);
|
||||
|
||||
text = g_object_new (CLUTTER_TYPE_TEXT,
|
||||
"use-markup", TRUE, "text", contents,
|
||||
NULL);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Contents: '%s' (expected: '%s')\n",
|
||||
clutter_text_get_text (text),
|
||||
display);
|
||||
|
@ -116,24 +116,24 @@ validate_result (TestState *state)
|
||||
{
|
||||
int ypos = 0;
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Testing onscreen clone...\n");
|
||||
validate_part (state, SOURCE_SIZE, ypos * SOURCE_SIZE, 0);
|
||||
ypos++;
|
||||
|
||||
#if 0 /* this doesn't work */
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Testing offscreen clone...\n");
|
||||
validate_part (state, SOURCE_SIZE, ypos * SOURCE_SIZE, 0);
|
||||
#endif
|
||||
ypos++;
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Testing onscreen clone with rectangular clip...\n");
|
||||
validate_part (state, SOURCE_SIZE, ypos * SOURCE_SIZE, ~1);
|
||||
ypos++;
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Testing onscreen clone with path clip...\n");
|
||||
validate_part (state, SOURCE_SIZE, ypos * SOURCE_SIZE, 1);
|
||||
ypos++;
|
||||
|
@ -10,7 +10,7 @@ timeline_progress_step (TestConformSimpleFixture *fixture G_GNUC_UNUSED,
|
||||
|
||||
timeline = clutter_timeline_new (1000);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("mode: step(3, end)\n");
|
||||
|
||||
clutter_timeline_rewind (timeline);
|
||||
@ -45,7 +45,7 @@ timeline_progress_step (TestConformSimpleFixture *fixture G_GNUC_UNUSED,
|
||||
clutter_timeline_advance (timeline, 1000);
|
||||
g_assert_cmpfloat (clutter_timeline_get_progress (timeline), ==, 1.0);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("mode: step-start\n");
|
||||
|
||||
clutter_timeline_rewind (timeline);
|
||||
@ -64,7 +64,7 @@ timeline_progress_step (TestConformSimpleFixture *fixture G_GNUC_UNUSED,
|
||||
clutter_timeline_advance (timeline, 1000);
|
||||
g_assert_cmpfloat (clutter_timeline_get_progress (timeline), ==, 1.0);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("mode: step-end\n");
|
||||
|
||||
clutter_timeline_rewind (timeline);
|
||||
|
@ -45,7 +45,7 @@ static void
|
||||
timeline_complete_cb (ClutterTimeline *timeline,
|
||||
TimelineData *data)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("%i: Completed\n", data->timeline_num);
|
||||
|
||||
data->completed_count++;
|
||||
@ -61,7 +61,7 @@ timeline_new_frame_cb (ClutterTimeline *timeline,
|
||||
int frame_no = ((msec * FRAME_COUNT + (FRAME_COUNT * 1000 / FPS) / 2)
|
||||
/ (FRAME_COUNT * 1000 / FPS));
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("%i: Doing frame %d, delta = %i\n",
|
||||
data->timeline_num, frame_no,
|
||||
clutter_timeline_get_delta (timeline));
|
||||
@ -77,7 +77,7 @@ timeline_marker_reached_cb (ClutterTimeline *timeline,
|
||||
guint frame_num,
|
||||
TimelineData *data)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("%i: Marker '%s' (%d) reached, delta = %i\n",
|
||||
data->timeline_num, marker_name, frame_num,
|
||||
clutter_timeline_get_delta (timeline));
|
||||
@ -117,7 +117,7 @@ check_timeline (ClutterTimeline *timeline,
|
||||
marker_reached_count[i]++;
|
||||
else
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("FAIL: unknown marker '%s' hit for timeline %i\n",
|
||||
(char *) node->data, data->timeline_num);
|
||||
succeeded = FALSE;
|
||||
@ -127,7 +127,7 @@ check_timeline (ClutterTimeline *timeline,
|
||||
for (i = 0; i < n_markers; i++)
|
||||
if (marker_reached_count[i] != 1)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("FAIL: marker '%s' hit %i times for timeline %i\n",
|
||||
markers[i], marker_reached_count[i], data->timeline_num);
|
||||
succeeded = FALSE;
|
||||
@ -141,7 +141,7 @@ check_timeline (ClutterTimeline *timeline,
|
||||
|
||||
if (missed_frame_count)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("FAIL: missed %i frame%s for timeline %i\n",
|
||||
missed_frame_count, missed_frame_count == 1 ? "" : "s",
|
||||
data->timeline_num);
|
||||
@ -151,7 +151,7 @@ check_timeline (ClutterTimeline *timeline,
|
||||
|
||||
if (data->completed_count != 1)
|
||||
{
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("FAIL: timeline %i completed %i times\n",
|
||||
data->timeline_num, data->completed_count);
|
||||
succeeded = FALSE;
|
||||
@ -267,7 +267,7 @@ timeline_base (TestConformSimpleFixture *fixture,
|
||||
"completed", G_CALLBACK (timeline_complete_cb),
|
||||
&data_3);
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("Without delay...\n");
|
||||
|
||||
clutter_timeline_start (timeline_1);
|
||||
@ -282,7 +282,7 @@ timeline_base (TestConformSimpleFixture *fixture,
|
||||
g_assert (check_timeline (timeline_2, &data_2, TRUE));
|
||||
g_assert (check_timeline (timeline_3, &data_3, TRUE));
|
||||
|
||||
if (g_test_verbose ())
|
||||
if (!g_test_quiet ())
|
||||
g_print ("With delay...\n");
|
||||
|
||||
timeline_data_destroy (&data_1);
|
||||
@ -331,7 +331,7 @@ timeline_markers_from_script (TestConformSimpleFixture *fixture,
|
||||
|
||||
test_file = clutter_test_get_data_file ("test-script-timeline-markers.json");
|
||||
clutter_script_load_from_file (script, test_file, &error);
|
||||
if (g_test_verbose () && error != NULL)
|
||||
if (!g_test_quiet () && error != NULL)
|
||||
g_print ("Error: %s", error->message);
|
||||
|
||||
g_assert_no_error (error);
|
||||
|
Loading…
Reference in New Issue
Block a user