conform: Clean up test names

Drop the 'test-' prefix: it's the conformance test suite, we know it's
full of tests.
This commit is contained in:
Emmanuele Bassi 2012-02-27 12:54:23 +00:00
parent e4c948b150
commit d16f2ac3b5
19 changed files with 149 additions and 152 deletions

View File

@ -16,13 +16,13 @@ units_sources =
# animation tests
units_sources += \
test-animator.c \
test-behaviours.c \
test-score.c \
test-state.c \
test-timeline.c \
test-timeline-interpolate.c \
test-timeline-rewind.c \
test-animator.c \
test-behaviours.c \
test-score.c \
test-state.c \
test-timeline.c \
test-timeline-interpolate.c \
test-timeline-rewind.c \
$(NULL)
# cogl tests
@ -48,39 +48,39 @@ units_sources += \
# actors tests
units_sources += \
test-actor-graph.c \
test-actor-destroy.c \
test-actor-invariants.c \
test-actor-iter.c \
test-actor-layout.c \
test-actor-size.c \
test-anchors.c \
test-binding-pool.c \
test-clutter-cairo-texture.c \
test-clutter-rectangle.c \
test-clutter-text.c \
test-clutter-texture.c \
test-group.c \
test-offscreen-redirect.c \
test-path.c \
test-paint-opacity.c \
test-pick.c \
test-texture-fbo.c \
test-text-cache.c \
test-shader-effect.c \
test-actor-graph.c \
test-actor-destroy.c \
test-actor-invariants.c \
test-actor-iter.c \
test-actor-layout.c \
test-actor-size.c \
test-anchors.c \
test-binding-pool.c \
test-cairo-texture.c \
test-group.c \
test-offscreen-redirect.c \
test-path.c \
test-paint-opacity.c \
test-pick.c \
test-shader-effect.c \
test-rectangle.c \
test-texture-fbo.c \
test-texture.c \
test-text-cache.c \
test-text.c \
$(NULL)
# objects tests
units_sources += \
test-clutter-units.c \
test-color.c \
test-model.c \
test-script-parser.c \
test-color.c \
test-model.c \
test-script-parser.c \
test-units.c \
$(NULL)
# cally tests
units_sources += \
test-cally-text.c \
test-cally-text.c \
$(NULL)
test_conformance_SOURCES = $(common_sources) $(units_sources)

View File

@ -3,8 +3,8 @@
#include "test-conform-common.h"
void
test_animator_multi_properties (TestConformSimpleFixture *fixture,
gconstpointer dummy)
animator_multi_properties (TestConformSimpleFixture *fixture,
gconstpointer dummy)
{
ClutterScript *script = clutter_script_new ();
GObject *animator = NULL, *foo = NULL;
@ -106,7 +106,7 @@ test_animator_multi_properties (TestConformSimpleFixture *fixture,
}
void
test_animator_properties (TestConformSimpleFixture *fixture,
animator_properties (TestConformSimpleFixture *fixture,
gconstpointer dummy)
{
ClutterScript *script = clutter_script_new ();
@ -169,8 +169,8 @@ test_animator_properties (TestConformSimpleFixture *fixture,
}
void
test_animator_base (TestConformSimpleFixture *fixture,
gconstpointer dummy)
animator_base (TestConformSimpleFixture *fixture,
gconstpointer dummy)
{
ClutterScript *script = clutter_script_new ();
GObject *animator = NULL;

View File

@ -64,7 +64,7 @@ static const struct
static const gint n_behaviour_tests = G_N_ELEMENTS (behaviour_tests);
void
test_behaviours (TestConformSimpleFixture *fixture,
behaviours_base (TestConformSimpleFixture *fixture,
gconstpointer dummy)
{
BehaviourFixture b_fixture;

View File

@ -262,8 +262,8 @@ on_activate (KeyGroup *key_group,
}
void
test_binding_pool (TestConformSimpleFixture *fixture,
gconstpointer data)
binding_pool (TestConformSimpleFixture *fixture,
gconstpointer data)
{
KeyGroup *key_group = g_object_new (TYPE_KEY_GROUP, NULL);

View File

@ -161,8 +161,8 @@ idle_cb (gpointer data)
}
void
test_clutter_cairo_texture (TestConformSimpleFixture *fixture,
gconstpointer data)
texture_cairo (TestConformSimpleFixture *fixture,
gconstpointer data)
{
TestState state;
unsigned int idle_source;

View File

@ -4,8 +4,8 @@
#include "test-conform-common.h"
void
test_color_hls_roundtrip (TestConformSimpleFixture *fixture,
gconstpointer data)
color_hls_roundtrip (TestConformSimpleFixture *fixture,
gconstpointer data)
{
ClutterColor color;
gfloat hue, luminance, saturation;
@ -73,8 +73,8 @@ test_color_hls_roundtrip (TestConformSimpleFixture *fixture,
}
void
test_color_from_string_invalid (TestConformSimpleFixture *fixture,
gconstpointer data)
color_from_string_invalid (TestConformSimpleFixture *fixture,
gconstpointer data)
{
ClutterColor color;
@ -89,8 +89,8 @@ test_color_from_string_invalid (TestConformSimpleFixture *fixture,
}
void
test_color_from_string_valid (TestConformSimpleFixture *fixture,
gconstpointer data)
color_from_string_valid (TestConformSimpleFixture *fixture,
gconstpointer data)
{
ClutterColor color;
@ -238,8 +238,8 @@ test_color_from_string_valid (TestConformSimpleFixture *fixture,
}
void
test_color_to_string (TestConformSimpleFixture *fixture,
gconstpointer data)
color_to_string (TestConformSimpleFixture *fixture,
gconstpointer data)
{
ClutterColor color;
gchar *str;
@ -256,8 +256,8 @@ test_color_to_string (TestConformSimpleFixture *fixture,
}
void
test_color_operators (TestConformSimpleFixture *fixture,
gconstpointer data)
color_operators (TestConformSimpleFixture *fixture,
gconstpointer data)
{
ClutterColor op1, op2;
ClutterColor res;

View File

@ -62,18 +62,19 @@ static TestConformSharedState *shared_state = NULL;
/* this is a macro that conditionally executes a test if CONDITION
* evaluates to TRUE; otherwise, it will put the test under the
* "/skip" namespace and execute a dummy function that will always
* "/skipped" namespace and execute a dummy function that will always
* pass.
*/
#define TEST_CONFORM_SKIP(CONDITION, NAMESPACE, FUNC) G_STMT_START { \
if (CONDITION) { \
if (CONDITION) { TEST_CONFORM_SIMPLE (NAMESPACE, FUNC); } \
else { \
g_test_add ("/skipped" NAMESPACE "/" #FUNC, \
TestConformSimpleFixture, \
shared_state, /* data argument for test */ \
test_conform_simple_fixture_setup, \
test_conform_skip_test, \
test_conform_simple_fixture_teardown); \
} else { TEST_CONFORM_SIMPLE (NAMESPACE, FUNC); } } G_STMT_END
} } G_STMT_END
#define TEST_CONFORM_TODO(NAMESPACE, FUNC) G_STMT_START { \
extern void FUNC (TestConformSimpleFixture *, gconstpointer); \
@ -106,7 +107,7 @@ clutter_test_init (gint *argc,
g_test_init (argc, argv, NULL);
g_test_bug_base ("http://bugzilla.openedhand.com/show_bug.cgi?id=%s");
g_test_bug_base ("http://bugzilla.gnome.org/show_bug.cgi?id=%s");
/* Initialise the state you need to share with everything.
*/
@ -160,9 +161,9 @@ main (int argc, char **argv)
TEST_CONFORM_SIMPLE ("/actor/invariants", actor_contains);
TEST_CONFORM_SIMPLE ("/actor/invariants", default_stage);
TEST_CONFORM_SIMPLE ("/actor/opacity", test_label_opacity);
TEST_CONFORM_SIMPLE ("/actor/opacity", test_rectangle_opacity);
TEST_CONFORM_SIMPLE ("/actor/opacity", test_paint_opacity);
TEST_CONFORM_SIMPLE ("/actor/opacity", opacity_label);
TEST_CONFORM_SIMPLE ("/actor/opacity", opacity_rectangle);
TEST_CONFORM_SIMPLE ("/actor/opacity", opacity_paint);
TEST_CONFORM_SIMPLE ("/text", text_utf8_validation);
TEST_CONFORM_SIMPLE ("/text", text_set_empty);
@ -177,57 +178,57 @@ main (int argc, char **argv)
TEST_CONFORM_SIMPLE ("/text", text_get_chars);
TEST_CONFORM_SIMPLE ("/text", text_cache);
TEST_CONFORM_SIMPLE ("/text", text_password_char);
TEST_CONFORM_SIMPLE ("/text", idempotent_use_markup);
TEST_CONFORM_SIMPLE ("/text", text_idempotent_use_markup);
TEST_CONFORM_SIMPLE ("/rectangle", test_rect_set_size);
TEST_CONFORM_SIMPLE ("/rectangle", test_rect_set_color);
TEST_CONFORM_SIMPLE ("/rectangle", rectangle_set_size);
TEST_CONFORM_SIMPLE ("/rectangle", rectangle_set_color);
TEST_CONFORM_SIMPLE ("/texture", test_texture_pick_with_alpha);
TEST_CONFORM_SIMPLE ("/texture", test_texture_fbo);
TEST_CONFORM_SIMPLE ("/texture/cairo", test_clutter_cairo_texture);
TEST_CONFORM_SIMPLE ("/texture", texture_pick_with_alpha);
TEST_CONFORM_SIMPLE ("/texture", texture_fbo);
TEST_CONFORM_SIMPLE ("/texture/cairo", texture_cairo);
TEST_CONFORM_SIMPLE ("/path", test_path);
TEST_CONFORM_SIMPLE ("/binding-pool", test_binding_pool);
TEST_CONFORM_SIMPLE ("/binding-pool", binding_pool);
TEST_CONFORM_SIMPLE ("/model", test_list_model_populate);
TEST_CONFORM_SIMPLE ("/model", test_list_model_iterate);
TEST_CONFORM_SIMPLE ("/model", test_list_model_filter);
TEST_CONFORM_SIMPLE ("/model", test_list_model_from_script);
TEST_CONFORM_SIMPLE ("/model", test_list_model_row_changed);
TEST_CONFORM_SIMPLE ("/model", list_model_populate);
TEST_CONFORM_SIMPLE ("/model", list_model_iterate);
TEST_CONFORM_SIMPLE ("/model", list_model_filter);
TEST_CONFORM_SIMPLE ("/model", list_model_from_script);
TEST_CONFORM_SIMPLE ("/model", list_model_row_changed);
TEST_CONFORM_SIMPLE ("/color", test_color_from_string_valid);
TEST_CONFORM_SIMPLE ("/color", test_color_from_string_invalid);
TEST_CONFORM_SIMPLE ("/color", test_color_to_string);
TEST_CONFORM_SIMPLE ("/color", test_color_hls_roundtrip);
TEST_CONFORM_SIMPLE ("/color", test_color_operators);
TEST_CONFORM_SIMPLE ("/color", color_from_string_valid);
TEST_CONFORM_SIMPLE ("/color", color_from_string_invalid);
TEST_CONFORM_SIMPLE ("/color", color_to_string);
TEST_CONFORM_SIMPLE ("/color", color_hls_roundtrip);
TEST_CONFORM_SIMPLE ("/color", color_operators);
TEST_CONFORM_SIMPLE ("/units", test_units_constructors);
TEST_CONFORM_SIMPLE ("/units", test_units_string);
TEST_CONFORM_SIMPLE ("/units", test_units_cache);
TEST_CONFORM_SIMPLE ("/units", units_constructors);
TEST_CONFORM_SIMPLE ("/units", units_string);
TEST_CONFORM_SIMPLE ("/units", units_cache);
TEST_CONFORM_SIMPLE ("/group", test_group_depth_sorting);
TEST_CONFORM_SIMPLE ("/group", group_depth_sorting);
TEST_CONFORM_SIMPLE ("/script", test_script_single);
TEST_CONFORM_SIMPLE ("/script", test_script_child);
TEST_CONFORM_SIMPLE ("/script", test_script_implicit_alpha);
TEST_CONFORM_SIMPLE ("/script", test_script_object_property);
TEST_CONFORM_SIMPLE ("/script", test_script_animation);
TEST_CONFORM_SIMPLE ("/script", test_script_named_object);
TEST_CONFORM_SIMPLE ("/script", test_animator_base);
TEST_CONFORM_SIMPLE ("/script", test_animator_properties);
TEST_CONFORM_SIMPLE ("/script", test_animator_multi_properties);
TEST_CONFORM_SIMPLE ("/script", test_state_base);
TEST_CONFORM_SIMPLE ("/script", test_script_layout_property);
TEST_CONFORM_SIMPLE ("/script", script_single);
TEST_CONFORM_SIMPLE ("/script", script_child);
TEST_CONFORM_SIMPLE ("/script", script_implicit_alpha);
TEST_CONFORM_SIMPLE ("/script", script_object_property);
TEST_CONFORM_SIMPLE ("/script", script_animation);
TEST_CONFORM_SIMPLE ("/script", script_named_object);
TEST_CONFORM_SIMPLE ("/script", script_layout_property);
TEST_CONFORM_SIMPLE ("/script", animator_base);
TEST_CONFORM_SIMPLE ("/script", animator_properties);
TEST_CONFORM_SIMPLE ("/script", animator_multi_properties);
TEST_CONFORM_SIMPLE ("/script", state_base);
TEST_CONFORM_SIMPLE ("/timeline", test_timeline);
TEST_CONFORM_SIMPLE ("/timeline", markers_from_script);
TEST_CONFORM_SKIP (!g_test_slow (), "/timeline", timeline_interpolation);
TEST_CONFORM_SKIP (!g_test_slow (), "/timeline", timeline_rewind);
TEST_CONFORM_SIMPLE ("/timeline", timeline_base);
TEST_CONFORM_SIMPLE ("/timeline", timeline_markers_from_script);
TEST_CONFORM_SKIP (g_test_slow (), "/timeline", timeline_interpolation);
TEST_CONFORM_SKIP (g_test_slow (), "/timeline", timeline_rewind);
TEST_CONFORM_SIMPLE ("/score", test_score);
TEST_CONFORM_SIMPLE ("/score", score_base);
TEST_CONFORM_SIMPLE ("/behaviours", test_behaviours);
TEST_CONFORM_SIMPLE ("/behaviours", behaviours_base);
/* FIXME - see bug https://bugzilla.gnome.org/show_bug.cgi?id=655588 */
TEST_CONFORM_TODO ("/cally", cally_text);

View File

@ -2,8 +2,8 @@
#include "test-conform-common.h"
void
test_group_depth_sorting (TestConformSimpleFixture *fixture,
gconstpointer data)
group_depth_sorting (TestConformSimpleFixture *fixture,
gconstpointer data)
{
ClutterActor *group;
ClutterActor *child, *test;

View File

@ -172,8 +172,8 @@ filter_odd_rows (ClutterModel *model,
}
void
test_list_model_filter (TestConformSimpleFixture *fixture,
gconstpointer data)
list_model_filter (TestConformSimpleFixture *fixture,
gconstpointer data)
{
ModelData test_data = { NULL, 0 };
ClutterModelIter *iter;
@ -260,8 +260,8 @@ test_list_model_filter (TestConformSimpleFixture *fixture,
}
void
test_list_model_iterate (TestConformSimpleFixture *fixture,
gconstpointer data)
list_model_iterate (TestConformSimpleFixture *fixture,
gconstpointer data)
{
ModelData test_data = { NULL, 0 };
ClutterModelIter *iter;
@ -335,8 +335,8 @@ test_list_model_iterate (TestConformSimpleFixture *fixture,
}
void
test_list_model_populate (TestConformSimpleFixture *fixture,
gconstpointer data)
list_model_populate (TestConformSimpleFixture *fixture,
gconstpointer data)
{
ModelData test_data = { NULL, 0 };
gint i;
@ -366,8 +366,8 @@ test_list_model_populate (TestConformSimpleFixture *fixture,
}
void
test_list_model_from_script (TestConformSimpleFixture *fixture,
gconstpointer dummy)
list_model_from_script (TestConformSimpleFixture *fixture,
gconstpointer dummy)
{
ClutterScript *script = clutter_script_new ();
GObject *model;
@ -383,11 +383,7 @@ test_list_model_from_script (TestConformSimpleFixture *fixture,
if (g_test_verbose () && error)
g_print ("Error: %s", error->message);
#if GLIB_CHECK_VERSION (2, 20, 0)
g_assert_no_error (error);
#else
g_assert (error == NULL);
#endif /* GLIB_CHECK_VERSION (2, 20, 0) */
model = clutter_script_get_object (script, "test-model");
@ -465,8 +461,8 @@ on_row_changed (ClutterModel *model,
}
void
test_list_model_row_changed (TestConformSimpleFixture *fixture,
gconstpointer data)
list_model_row_changed (TestConformSimpleFixture *fixture,
gconstpointer data)
{
ChangedData test_data = { NULL, NULL, 0, 0 };
GValue value = { 0, };

View File

@ -4,8 +4,8 @@
#include "test-conform-common.h"
void
test_label_opacity (TestConformSimpleFixture *fixture,
gpointer dummy)
opacity_label (TestConformSimpleFixture *fixture,
gpointer dummy)
{
ClutterActor *stage;
ClutterActor *label;
@ -43,8 +43,8 @@ test_label_opacity (TestConformSimpleFixture *fixture,
}
void
test_rectangle_opacity (TestConformSimpleFixture *fixture,
gpointer dummy)
opacity_rectangle (TestConformSimpleFixture *fixture,
gpointer dummy)
{
ClutterActor *stage;
ClutterActor *rect;
@ -77,8 +77,8 @@ test_rectangle_opacity (TestConformSimpleFixture *fixture,
}
void
test_paint_opacity (TestConformSimpleFixture *fixture,
gpointer dummy)
opacity_paint (TestConformSimpleFixture *fixture,
gpointer dummy)
{
ClutterActor *stage, *group1, *group2;
ClutterActor *label, *rect;

View File

@ -9,7 +9,7 @@
#include "test-conform-common.h"
void
test_rect_set_size (TestConformSimpleFixture *fixture,
rectangle_set_size (TestConformSimpleFixture *fixture,
gconstpointer data)
{
ClutterActor *rect = clutter_rectangle_new ();
@ -33,7 +33,7 @@ test_rect_set_size (TestConformSimpleFixture *fixture,
}
void
test_rect_set_color (TestConformSimpleFixture *fixture,
rectangle_set_color (TestConformSimpleFixture *fixture,
gconstpointer data)
{
ClutterActor *rect = clutter_rectangle_new ();

View File

@ -43,7 +43,7 @@ on_timeline_completed (ClutterScore *score,
}
void
test_score (TestConformSimpleFixture *fixture,
score_base (TestConformSimpleFixture *fixture,
gconstpointer data)
{
ClutterScore *score;

View File

@ -115,8 +115,8 @@ test_group_init (TestGroup *self)
}
void
test_script_child (TestConformSimpleFixture *fixture,
gconstpointer dummy)
script_child (TestConformSimpleFixture *fixture,
gconstpointer dummy)
{
ClutterScript *script = clutter_script_new ();
GObject *container, *actor;
@ -165,8 +165,8 @@ test_script_child (TestConformSimpleFixture *fixture,
}
void
test_script_single (TestConformSimpleFixture *fixture,
gconstpointer dummy)
script_single (TestConformSimpleFixture *fixture,
gconstpointer dummy)
{
ClutterScript *script = clutter_script_new ();
ClutterColor color = { 0, };
@ -203,8 +203,8 @@ test_script_single (TestConformSimpleFixture *fixture,
}
void
test_script_implicit_alpha (TestConformSimpleFixture *fixture,
gconstpointer dummy)
script_implicit_alpha (TestConformSimpleFixture *fixture,
gconstpointer dummy)
{
ClutterScript *script = clutter_script_new ();
ClutterTimeline *timeline;
@ -242,8 +242,8 @@ test_script_implicit_alpha (TestConformSimpleFixture *fixture,
}
void
test_script_object_property (TestConformSimpleFixture *fixture,
gconstpointer dummy)
script_object_property (TestConformSimpleFixture *fixture,
gconstpointer dummy)
{
ClutterScript *script = clutter_script_new ();
ClutterLayoutManager *manager;
@ -273,8 +273,8 @@ test_script_object_property (TestConformSimpleFixture *fixture,
}
void
test_script_named_object (TestConformSimpleFixture *fixture,
gconstpointer dummy)
script_named_object (TestConformSimpleFixture *fixture,
gconstpointer dummy)
{
ClutterScript *script = clutter_script_new ();
ClutterLayoutManager *manager;
@ -305,8 +305,8 @@ test_script_named_object (TestConformSimpleFixture *fixture,
}
void
test_script_animation (TestConformSimpleFixture *fixture,
gconstpointer dummy)
script_animation (TestConformSimpleFixture *fixture,
gconstpointer dummy)
{
ClutterScript *script = clutter_script_new ();
GObject *animation = NULL;
@ -332,8 +332,8 @@ test_script_animation (TestConformSimpleFixture *fixture,
}
void
test_script_layout_property (TestConformSimpleFixture *fixture,
gconstpointer dummy G_GNUC_UNUSED)
script_layout_property (TestConformSimpleFixture *fixture,
gconstpointer dummy G_GNUC_UNUSED)
{
ClutterScript *script = clutter_script_new ();
GObject *manager, *container, *actor1, *actor2;

View File

@ -3,8 +3,8 @@
#include "test-conform-common.h"
void
test_state_base (TestConformSimpleFixture *fixture G_GNUC_UNUSED,
gconstpointer dummy G_GNUC_UNUSED)
state_base (TestConformSimpleFixture *fixture G_GNUC_UNUSED,
gconstpointer dummy G_GNUC_UNUSED)
{
ClutterScript *script = clutter_script_new ();
GObject *state = NULL;

View File

@ -450,7 +450,7 @@ validate_markup_attributes (ClutterText *text,
}
void
idempotent_use_markup (void)
text_idempotent_use_markup (void)
{
ClutterText *text;
const char *contents = "foo <b>bar</b>";

View File

@ -169,8 +169,8 @@ queue_redraw (gpointer stage)
}
void
test_texture_fbo (TestConformSimpleFixture *fixture,
gconstpointer data)
texture_fbo (TestConformSimpleFixture *fixture,
gconstpointer data)
{
TestState state;
ClutterActor *actor;

View File

@ -29,8 +29,8 @@ make_texture (void)
}
void
test_texture_pick_with_alpha (TestConformSimpleFixture *fixture,
gconstpointer data)
texture_pick_with_alpha (TestConformSimpleFixture *fixture,
gconstpointer data)
{
ClutterTexture *tex = CLUTTER_TEXTURE (clutter_texture_new ());
ClutterStage *stage = CLUTTER_STAGE (clutter_stage_new ());

View File

@ -182,7 +182,7 @@ delay_cb (gpointer data)
}
void
test_timeline (TestConformSimpleFixture *fixture,
timeline_base (TestConformSimpleFixture *fixture,
gconstpointer data)
{
ClutterTimeline *timeline_1;
@ -320,8 +320,8 @@ test_timeline (TestConformSimpleFixture *fixture,
}
void
markers_from_script (TestConformSimpleFixture *fixture,
gconstpointer data)
timeline_markers_from_script (TestConformSimpleFixture *fixture,
gconstpointer data)
{
ClutterScript *script = clutter_script_new ();
ClutterTimeline *timeline;

View File

@ -4,8 +4,8 @@
#include "test-conform-common.h"
void
test_units_cache (TestConformSimpleFixture *fixture,
gconstpointer data)
units_cache (TestConformSimpleFixture *fixture,
gconstpointer data)
{
ClutterUnits units;
ClutterSettings *settings;
@ -29,8 +29,8 @@ test_units_cache (TestConformSimpleFixture *fixture,
}
void
test_units_constructors (TestConformSimpleFixture *fixture,
gconstpointer data)
units_constructors (TestConformSimpleFixture *fixture,
gconstpointer data)
{
ClutterUnits units, units_cm;
@ -57,8 +57,8 @@ test_units_constructors (TestConformSimpleFixture *fixture,
}
void
test_units_string (TestConformSimpleFixture *fixture,
gconstpointer data)
units_string (TestConformSimpleFixture *fixture,
gconstpointer data)
{
ClutterUnits units;
gchar *string;