Commit Graph

500 Commits

Author SHA1 Message Date
Emmanuele Bassi
2a660fa298 Fully rework the conformance test suite
The current conformance test suite is suboptimal in many ways.

All tests are built into the same binary, which makes adding new tests,
builting tests, and running groups of tests much more awkward than it
needs to be. The first issue, especially, raises the bar of contribution
in a significant way, while the other two take their toll on the
maintainer. All of these changes were introduced back when we had both
Clutter and Cogl tests in tree, and because we were building the test
suite for every single change; since then, Cogl moved out of tree with
all its tests, and we build the conformance test suite only when running
the `check` make target.

This admittedly large-ish commit changes the way the conformance test
suite works, taking advantage of the changes in the GTest API and test
harness.

First of all, all tests are now built separately, using their own test
suite as defined by each separate file. All tests run under the TAP
harness provided by GTest and Automake, to gather a proper report using
the Test Anything Protocol without using the `gtester` harness and the
`gtester-report` script. We also use the Makefile rules provided by GLib
to vastly simplify the build environment for the conformance test suite.

On top of the changes for the build and harness, we also provide new API
for creating and running test suites for Clutter. The API is public,
because the test suite has to use it, but it's minimal and mostly
provides convenience wrappers around GTest that make writing test units
for Clutter easier.

This commit disables all tests in the conformance test suite, as well as
moving the data files outside of the tests/data directory; the next few
commits will re-establish the conformance test suite separately so we
can check that everything works in a reliable way.
2013-12-12 18:51:11 +00:00
Neil Roberts
00ef6e29ce Make test-clip friendly for people with only one mouse button
The various shapes can now be drawn by holding down modifier keys
instead of requiring a three-button mouse.

https://bugzilla.gnome.org/show_bug.cgi?id=719716
2013-12-04 16:06:20 +00:00
Lionel Landwerlin
371b12c4af tests: add an interactive test for rotate and zoom actions
https://bugzilla.gnome.org/show_bug.cgi?id=698836
2013-08-19 23:23:08 +01:00
Emmanuele Bassi
700baccc7c build: Generate gitignore on BUILT_SOURCES
The test-unit-names.h header file is generated unconditionally, so we
need to generate the gitignore file that references it along with the
header.
2013-08-19 23:22:38 +01:00
Emmanuele Bassi
fa72540246 build: Ensure tests are built only on make check
Tests should only be enabled when we want to run them, or when we are
generating a tarball.
2013-08-19 23:22:38 +01:00
Emmanuele Bassi
4a05ac34fc build: Disable Cogl deprecation warnings for tests
We are exercising all sorts of deprecated API anyway.
2013-07-02 22:26:49 +01: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
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
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
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
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
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
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
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
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
Emmanuele Bassi
c9028cee48 Move scroll actor test to the examples
Nothing specific to test, and the code is idiomatic enough to be used as
an example.
2012-05-17 10:57:15 +01:00
Emmanuele Bassi
5ad1ec7cca Put bind-constraint back into the interactive tests
The bind-constraint.c example still uses clutter_actor_animate(), and
it'd require some serious reworking to move it to
ClutterPropertyTransition or to implicit animations.
2012-05-08 16:15:33 +01:00
Emmanuele Bassi
c6b226e6c7 Move the easing modes test into the examples
It's a pretty simple, self-contained example of how to use different
easing modes, as well as the implicit animations API.
2012-05-02 18:37:36 +01:00
Emmanuele Bassi
3fab1e4026 interactive/transitions: Modernize
Drop deprecated API.
2012-05-02 12:45:45 +01:00
Emmanuele Bassi
ad27141556 interactive/binding-pool: Modernize
Drop deprecated API.
2012-05-02 12:45:18 +01:00
Emmanuele Bassi
46409b4043 Move FlowLayout test into examples
There's nothing really test-worthy in the ClutterFlowLayout interactive
test; it can be lifted pretty much as is, and placed into the examples.
2012-05-02 12:14:45 +01:00
Emmanuele Bassi
b8f6ed184d interactive/flow-layout: Modernize code
Drop deprecated API usage.
2012-05-02 12:03:14 +01:00
Emmanuele Bassi
07c95ebf0c Move examples from tests/interactive to a new top-level
The example code that is meant to be XIncluded into the API reference
should not be part of the interactive test suite: it's code that it is
meant to be used as a reference implementation - whereas the interactive
test suite should be allowed to be lean and test behaviour even in nasty
ways. In short: the test suite should not be the place where we show off
idiomatic code for educational purposes.
2012-05-01 19:00:35 +01:00
Emmanuele Bassi
999bbe20a5 Add ClutterScrollActor
ClutterScrollActor is an actor that allows showing a portion of its
contents.
2012-04-27 12:30:50 +01:00
Emmanuele Bassi
4d34a2229d interactive/table-layout: Enable animations 2012-04-27 12:30:50 +01:00
Emmanuele Bassi
807d77c0f3 box-layout: Add the :orientation property
And deprecate the :vertical property.

An enumeration is clearer, and we can use it elsewhere in the API.
2012-04-27 12:30:49 +01:00
Emmanuele Bassi
4067dcdfe1 interactive/bin-layout: Improve the example code
Use modern API; clean up the code, and document it so that it's possible
to XInclude it into the API reference.
2012-04-27 12:30:49 +01:00
Emmanuele Bassi
217c4e7ba0 actor: Remove automatic transition init from add_transition()
Adding an explicit transition overrides any consideration of the easing
state of an actor.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
c500fc1844 Add ClutterTransitionGroup
The TransitionGroup class is a logical container for running multiple
transitions.

TransitionGroup is not a Score: it is a Transition that advances each
Transition it contains using the delta between frames, and ensures that
all transitions are in a consistent state; these transitions are not
advanced by the master clock.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
270894342e Add ClutterKeyframeTransition
A simple transition class that interpolates a property between key
frames.
2012-04-27 12:30:48 +01:00
Emmanuele Bassi
0bf5008159 interactive/snap-constaint: Modernize code 2012-04-12 17:08:33 +01:00
Emmanuele Bassi
612b714149 interactive/stage-sizing: Clean up 2012-04-10 12:12:28 +01:00
Emmanuele Bassi
656c641d31 interactive/bin-layout: Call save/restore easing state
Don't do unprotected calls to set_easing_mode() and
set_easing_duration().
2012-03-29 15:12:09 +01:00
Emmanuele Bassi
499534f3ac actor: Make :content-gravity animatable
Let's start making some non-trivial property animatable, like the
content gravity.
2012-03-29 15:11:52 +01:00
Emmanuele Bassi
39ddf9c542 interactive/animation: Use implicit animations instead of animate()
Also, nest animations.
2012-03-28 13:01:17 +01:00
Emmanuele Bassi
2355b57aab interactive/transitions: Jump to middle-click coordinates
Middle click will update an existing transition while in flight, and
skip it.
2012-03-28 12:46:30 +01:00
Emmanuele Bassi
0f7dab15d8 interactive/transitions: Add missing easing state save/restore
The test hasn't been updated after commit 229241b8, and was trying to
change the easing state without creating one.
2012-03-28 11:49:53 +01:00