Commit Graph

1107 Commits

Author SHA1 Message Date
Colin Walters
8ac9346046 tests/conform/texture-fbo: Log failure better
We might as well print out exactly which assertion failed.
2013-06-24 20:30:40 +01:00
Emmanuele Bassi
de20785b1b conform: Conditionally execute the texture-fbo unit
If we don't have support for offscreen buffers, then there's no point in
testing FBO support in ClutterTexture — a feature that has been long
since deprecated, on a deprecated class.
2013-06-24 19:43:44 +01:00
Colin Walters
18917259fe Revert "Install a11y tests too"
This reverts commit 2b4f47d444.

These are presently "examples" (because they're just run
interactively, not automatable tests).

Conflicts:
	tests/accessibility/Makefile.am
2013-06-24 14:32:16 -04:00
Matthias Clasen
ada04546f0 Fix build with --enable-installed-tests
Space, the ultimate frontier...and the breaker of Makefiles.
2013-06-24 13:37:41 -04:00
Matthias Clasen
3084286874 Install a11y tests too
https://bugzilla.gnome.org/show_bug.cgi?id=702941
2013-06-23 23:28:25 -04:00
Matthias Clasen
e98f32b7c8 Install conformance tests
Install the conformance tests, and metadata to run them
with gnome-desktop-testing-runner.

https://bugzilla.gnome.org/show_bug.cgi?id=702941
2013-06-23 23:28:19 -04:00
Emmanuele Bassi
150090c19b conform: Ensure that we don't leak references
Especially on actors that are not parented and get destroyed.
2013-06-12 10:27:37 +01:00
Emmanuele Bassi
caf6959195 conform: Add suite for actor's meta objects 2013-06-12 10:04:32 +01:00
Emmanuele Bassi
0065fb459c Revert "units: Handle negative values in clutter_units_from_string()"
Stray commit got pushed too soon.

This reverts commit 44f283bb72.
2013-05-22 14:34:22 +01:00
Bastian Winkler
44f283bb72 units: Handle negative values in clutter_units_from_string()
In order to allow values like "-2cm" in ClutterScript,
clutter_units_from_string() needs to handle negative values as well.
2013-05-22 15:26:12 +02:00
Emmanuele Bassi
323ec19dcc build: Remove INCLUDES directives
They have been deprecated for a while, replaced by AM_CPPFLAGS.
2013-05-15 15:18:13 +01:00
Emmanuele Bassi
c9583792cb build: Fix up the silent rules prefixes
Automake increased the whitespace, so we need to do that for our "I
Can't Believe It's Not Autotool™" rules.
2013-05-15 15:07:15 +01:00
Lionel Landwerlin
d1041e1f4f conform: add offscreen effects fbo size check
https://bugzilla.gnome.org/show_bug.cgi?id=699675
2013-05-15 14:58:46 +01:00
Emmanuele Bassi
160c62b2f9 conform: Disable the Cogl tests
Cogl is being tested pretty well, these days; also, there is a failure
in the mipmap test that I really don't have time to bisect.
2013-02-20 23:31:17 +00:00
Rob Bradford
6bef2cff19 conformance: Only check for DISPLAY on X11 windowing backend
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=693741
2013-02-20 23:06:28 +00:00
Emmanuele Bassi
65a024af92 timeline: Add progress-based marker API
Being able to set a marker at a normalized point on a timeline, instead
of using a specific time, is a nice fit with the current Timeline class
API.

https://bugzilla.gnome.org/show_bug.cgi?id=694319
2013-02-20 23:06:28 +00:00
Nirbheek Chauhan
a783e6d3f2 clutter-text: Allow setting attributes for editable text
The behaviour imitates GtkEntry and ignores attributes from markup because Pango
barfs on invalid markup. Also add an example to the text-field interactive test.

https://bugzilla.gnome.org/show_bug.cgi?id=686477
2013-01-16 22:24:14 +00:00
Emanuele Aina
219d0efcc6 actor: rollback pivot translation even on explicit transforms
When setting an explicit transform with clutter_actor_set_transform()
and a non (0,0) pivot-point, clutter_actor_apply_transform() will fail
to roll back the pivot-point translation done before multiplying the
transformation matrix due to the "out:" label being slightly misplaced
in clutter_actor_real_apply_transform().

This works properly:
  clutter_actor_set_pivot_point (actor, 0.5, 0.5);
  clutter_actor_set_rotation_angle (actor, CLUTTER_Z_AXIS, 30);

This results in the actor being moved to the pivot-point position:
  clutter_actor_set_pivot_point (actor, 0.5, 0.5);
  clutter_matrix_init_identity(&matrix);
  cogl_matrix_rotate (&matrix, 30, 0, 0, 1.0);
  clutter_actor_set_transform (actor, &matrix);

This also add a conformance test checking that even when using a
pivot-point, no matter how a rotation is set the resulting
transformation matrix will be the same.

https://bugzilla.gnome.org/show_bug.cgi?id=690214
2012-12-14 19:15:48 +01:00
Jasper St. Pierre
511e266a85 A bunch of fixes for Coverity
None of these are relevant enough for their own fixes.

https://bugzilla.gnome.org/show_bug.cgi?id=689496
2012-12-02 14:50:54 -05:00
Emanuele Aina
b94595f5f7 tests: Track TOUCH_CANCEL events in test-events 2012-11-26 13:29:36 +01:00
Emanuele Aina
7007273405 tests: Print touch sequences in test-events
https://bugzilla.gnome.org/show_bug.cgi?id=685186
2012-11-26 13:29:36 +01:00
Emanuele Aina
ad288c8061 tests: Print the modifiers state on mouse/touch events 2012-11-26 13:29:36 +01:00
Daniel Stone
13d889814c test: Only run X11-specific code when using X11
The X11-specific windowing checks were hidden behind an #ifdef, however
if the tests were run under Wayland, they would execute uncondionally
and cause assertion failures.  Fix this by also hiding them behind a
check that the current backend is indeed X11.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-10-12 15:12:55 +01:00
Emanuele Aina
d587fa4e28 tests: print coords and devices in test-events
Print event coordinates on events other than motion and also track
the device and source device ids in ./tests/interactive/test-events

https://bugzilla.gnome.org/show_bug.cgi?id=684552
2012-09-24 17:03:36 +01:00
Emanuele Aina
d616fd628b tests: style fixes to test-events
Oops, I pushed the commit without the style fixes. Followup commit
for 47347d5.
2012-09-12 20:08:16 +02:00
Emanuele Aina
47347d5f5c tests: handle smooth scroll events in test-events
Print the precise scroll delta for smooth scroll events and
correctly print the direction for left/right scrolls.

https://bugzilla.gnome.org/show_bug.cgi?id=683870
2012-09-12 15:31:55 +02:00
Emanuele Aina
8a69210363 tests: track touch events in test-events
Enable xinput support in the X11 backend form test-events to
receive touch[begin|update|end] events.

https://bugzilla.gnome.org/show_bug.cgi?id=683869
2012-09-12 14:57:48 +02:00
Sjoerd Simons
903452d2df interactive/touch-events: Optimize touch event drawing
The current versions redraws all events on every redraw, which starts
getting very slow quickly. Instead simply draw only the new events
except when the cairo surface got reset, in that case redraw all events
again.

https://bugzilla.gnome.org/show_bug.cgi?id=681584
2012-08-10 15:05:43 +01:00
Emmanuele Bassi
41ed9023eb build: Fix out of tree builds 2012-07-30 12:33:24 +01:00
Emmanuele Bassi
25878c6c13 interactive/keyframe: Use transition-stopped signal 2012-07-26 14:01:01 +01:00
Emmanuele Bassi
4546f84408 timeline: Add support for step() progress
The CSS3 Transitions specification from the W3C defines the possibility
of using a parametrized step() timing function, with the following
prototype:

        steps(n_steps, [ start | end ])

where @n_steps represents the number of steps used to divide an interval
between 0 and 1; the 'start' and 'end' tokens describe whether the value
change should happen at the start of the transition, or at the end.

For instance, the "steps(3, start)" timing function has the following
profile:

  1 |           x
    |           |
    |       x---|
    |       '   |
    |   x---'   |
    |   '       |
  0 |---'       |

Whereas the "steps(3, end)" timing function has the following profile:

  1 |       x---|
    |       '   |
    |   x---'   |
    |   '       |
    x---'       |
    |           |
  0 |           |

Since ClutterTimeline uses an enumeration for controlling the progress
mode, we need additional API to define the parameters of the steps()
progress; for this reason, we need a CLUTTER_STEPS enumeration value,
and a method for setting the number of steps and the value transition
policy.

The CSS3 Transitions spec helpfully also defines a step-start and a
step-end shorthands, which expand to step(1, start) and step(1, end)
respectively; we can provide a CLUTTER_STEP_START and CLUTTER_STEP_END
enumeration values for those.
2012-07-19 20:47:00 -04:00
Emmanuele Bassi
d7eb57a711 interactive/animation: Use pivot point
Instead of the anchor point and the rotation center.
2012-07-19 14:18:09 -04:00
Emmanuele Bassi
1da42dd8a0 actor: Add ActorIter.is_valid()
It can be useful to check whether a ClutterActorIter is currently valid,
i.e. if the iterator has been initialized *and* if the actor to which it
refers to hasn't been updated.

We can also use the is_valid() method in the conformance test suite to
check that initialization has been successful, and that changing the
children list through the ClutterActorIter API leaves the iterator in a
valid state.
2012-06-27 21:28:01 +01:00
Emmanuele Bassi
1ca4937f1e conform: Check that iterators work post-assignment
It should be possible to copy a ClutterActorIter just by copying its
contents (either via assignment or memcpy).
2012-06-27 21:28:01 +01:00
Emmanuele Bassi
98982331cb conform/script: Add the return type for the margin test
The compiler would default to 'int', and warn - and then warn again
because the function would not return a value.
2012-06-20 18:58:31 +01:00
Emmanuele Bassi
3ad5502003 interactive/touch-events: Protect x11-specific calls
Use the CLUTTER_WINDOWING_X11 define to protect platform-specific calls
like clutter_x11_enable_xinput().

https://bugzilla.gnome.org/show_bug.cgi?id=678423
2012-06-20 08:53:56 +01:00
Emmanuele Bassi
47f8be4d4b conform: Put xinput enabling under guards
Calling clutter_x11_* API should be done only under the platform
specific guards we provide with Clutter.

https://bugzilla.gnome.org/show_bug.cgi?id=678423
2012-06-20 08:53:46 +01:00
Emmanuele Bassi
b850696b31 interactive/touch-events: Add a missing return value
The draw_touches() function must return a boolean value.

https://bugzilla.gnome.org/show_bug.cgi?id=678391
2012-06-19 12:20:11 +01:00
Emmanuele Bassi
c57cabd4c2 conform/interval: Add transformation unit test
Verify that it's possible to pass a transformable type to
ClutterInterval.
2012-06-18 18:04:54 +01:00
Emmanuele Bassi
aacd28cc21 conform: Initial suite for ClutterInterval
ClutterInterval is undertested, so we should start adding a unit test
for it.
2012-06-18 18:04:54 +01:00
Alejandro Piñeiro
b525253c88 tests: a11y: updated atkevents after bug 675183 2012-06-18 12:45:02 +02:00
Frédéric Péters
a88f73091b tests: link test-conformance against libm
https://bugzilla.gnome.org/show_bug.cgi?id=677921
2012-06-15 15:30:24 +01:00
Tomeu Vizoso
b4222db71d tests: Make sure we return 0 only on error 2012-06-14 11:17:05 +02:00
Tomeu Vizoso
d72558d3ca Stop casting ClutterTouchSequence* to ulong
Use instead a hash table to link touch sequences to colors.
2012-06-14 11:16:29 +02:00
Emmanuele Bassi
1ab6fc0b39 conform/events-touch: Silently bail out if init failed
This removes the need to conditionally run the test.
2012-06-07 12:23:49 +01:00
Tomeu Vizoso
b339b845cb tests: Add unit test for touch event handling
For now, it just generates a simple horizontal slide (by writing
to /dev/uinput) and checks that the stage gets the events at the
expected coordinates.

The test won't run if it doesn't have read/write permissions to
/dev/uinput.

It also adds OS_LINUX to config.h.
2012-06-07 12:12:56 +02:00
Tomeu Vizoso
43d40758bd tests: Add interactive test for touch events
https://bugzilla.gnome.org/show_bug.cgi?id=677390
2012-06-05 16:00:01 +02:00
Bastian Winkler
f14c71cd3c examples: Updated box-layout example
Updated test-box-layout to use modern API and move it to examples.

https://bugzilla.gnome.org/show_bug.cgi?id=677283
2012-06-04 16:16:39 +02:00
Emmanuele Bassi
f9c29d5067 build: Move test-unit-names.h out of the dist
Let it be generated at build time, as it should.

https://bugzilla.gnome.org/show_bug.cgi?id=674365
2012-05-28 15:36:48 +01:00
Emmanuele Bassi
129752e560 event: Add convenience functions for Shift and Ctrl modifiers
Instead of going through clutter_event_get_state() and checking if the
modifier mask is set, we can provide simple convenience functions to do
it for us.
2012-05-25 11:33:57 +01:00