mirror of
https://github.com/brl/mutter.git
synced 2024-12-18 00:52:05 +00:00
603f936745
framework * configure.ac: * tests/*: The tests have been reorganised into different categories: conformance, interactive and micro benchmarks. - conformance tests can be run as part of automated tests - interactive tests are basically all the existing tests - micro benchmarks focus on a single performance metric I converted the timeline tests to conformance tests and also added some tests from Neil Roberts and Ebassi. Note: currently only the conformance tests use the glib test APIs, though the micro benchmarks should too. The other change is to make the unit tests link into monolithic binaries which makes the build time for unit tests considerably faster. To deal with the extra complexity this adds to debugging individual tests I have added some sugar to the makefiles so all the tests can be run directly via a symlink and when an individual test is run this way, then a note is printed to the terminal explaining exactly how that test may be debugged using GDB. There is a convenience make rule: 'make test-report', that will run all the conformance tests and hopefully even open the results in your web browser. It skips some of the slower timeline tests, but you can run those using 'make full-report'
53 lines
1.6 KiB
C
53 lines
1.6 KiB
C
#include <gmodule.h>
|
|
#include <clutter/clutter.h>
|
|
|
|
G_MODULE_EXPORT int
|
|
test_perspective_main (int argc, char *argv[])
|
|
{
|
|
ClutterActor *rect;
|
|
ClutterActor *stage;
|
|
ClutterColor red = {0xff, 0, 0, 0xff}, white = {0xff, 0xff, 0xff, 0xff};
|
|
|
|
clutter_init (&argc, &argv);
|
|
|
|
stage = clutter_stage_get_default ();
|
|
g_object_set (stage, "fullscreen", TRUE, NULL);
|
|
|
|
clutter_stage_set_color (CLUTTER_STAGE (stage), &red);
|
|
|
|
rect = clutter_rectangle_new_with_color (&white);
|
|
clutter_actor_set_size (rect,
|
|
clutter_actor_get_width(stage),
|
|
clutter_actor_get_height(stage));
|
|
clutter_actor_set_position (rect, 0, 0);
|
|
clutter_group_add (CLUTTER_GROUP (stage), rect);
|
|
|
|
rect = clutter_rectangle_new_with_color (&red);
|
|
clutter_actor_set_size (rect, 2, 2);
|
|
clutter_actor_set_position (rect, 1, 1);
|
|
clutter_group_add (CLUTTER_GROUP (stage), rect);
|
|
|
|
rect = clutter_rectangle_new_with_color (&red);
|
|
clutter_actor_set_size (rect, 2, 2);
|
|
clutter_actor_set_position (rect, clutter_actor_get_width(stage)-3, 1);
|
|
clutter_group_add (CLUTTER_GROUP (stage), rect);
|
|
|
|
rect = clutter_rectangle_new_with_color (&red);
|
|
clutter_actor_set_size (rect, 2, 2);
|
|
clutter_actor_set_position (rect, 1, clutter_actor_get_height(stage)-3);
|
|
clutter_group_add (CLUTTER_GROUP (stage), rect);
|
|
|
|
rect = clutter_rectangle_new_with_color (&red);
|
|
clutter_actor_set_size (rect, 2, 2);
|
|
clutter_actor_set_position (rect,
|
|
clutter_actor_get_width(stage)-3,
|
|
clutter_actor_get_height(stage)-3);
|
|
clutter_group_add (CLUTTER_GROUP (stage), rect);
|
|
|
|
clutter_actor_show_all (CLUTTER_ACTOR (stage));
|
|
|
|
clutter_main ();
|
|
|
|
return 0;
|
|
}
|