Commit Graph

9 Commits

Author SHA1 Message Date
Neil Roberts
9c7afe0c5b [timeline] Remove the concept of frames from timelines
Timelines no longer work in terms of a frame rate and a number of
frames but instead just have a duration in milliseconds. This better
matches the working of the master clock where if any timelines are
running it will redraw as fast as possible rather than limiting to the
lowest rated timeline.

Most applications will just create animations and expect them to
finish in a certain amount of time without caring about how many
frames are drawn. If a frame is going to be drawn it might as well
update all of the animations to some fraction of the total animation
rather than rounding to the nearest whole frame.

The 'frame_num' parameter of the new-frame signal is now 'msecs' which
is a number of milliseconds progressed along the
timeline. Applications should use clutter_timeline_get_progress
instead of the frame number.

Markers can now only be attached at a time value. The position is
stored in milliseconds rather than at a frame number.

test-timeline-smoothness and test-timeline-dup-frames have been
removed because they no longer make sense.
2009-06-04 13:21:57 +01:00
Emmanuele Bassi
cf28c023a0 [tests] Manually advance the timelines
The units in the Timeline test suite just rely on the timeline
being a timeout automatically advanced by the main loop. This
is not the case anymore, since the merge of the master-clock.

To make the test units work again we need to "emulate" the master
clock without effectively having a stage to redraw; we do this
by creating a frame source and manually advancing the timelines
we create for test purposes, using the advance_msecs() "protected"
method.
2009-05-01 15:08:42 +01:00
Emmanuele Bassi
ccca24ab76 Remove usage of the grave accent as quotation mark
See:

  http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html

This should make Thomas happy.
2009-03-17 14:13:31 +00:00
Emmanuele Bassi
00a4549eb1 [tests] Remove an unused variable
This fixes a compiler warning.
2009-01-27 13:22:47 +00:00
Emmanuele Bassi
0616237064 [tests] Assert as soon as possible
In order to give a usable location of the errors in the test
suite, we need to assert() as soon as possible.
2009-01-27 09:51:45 +00:00
Neil Roberts
7324db4a0c * tests/conform/test-timeline.c (test_timeline): Remove the delay
idle handler after the test is finished, otherwise it will
	continue running during subsequent tests. This was breaking
	test_timeline_interpolate.
2008-11-18 18:30:55 +00:00
Emmanuele Bassi
ca7bdc12a4 2008-11-10 Emmanuele Bassi <ebassi@linux.intel.com>
* tests/conform/test-label-cache.c:
	* tests/conform/test-pick.c:
	* tests/conform/test-timeline.c: Show all the output messages only
	if the test was done with the verbose flag turned on.

	* tests/interactive/test-main.c: Do not use the (gpointer*) cast,
	but use a temporary gpointer instead.
2008-11-10 12:28:42 +00:00
Robert Bragg
98f942fd72 * tests/conform/Makefile.am:
* tests/conform/wrapper.sh:
	* tests/conform/test-conform-main.c:
	* tests/conform/test-timeline.c:
	Adds Neil's updates to test-timeline.c so it now works with the new unit
	testing infrastructure.

	Also some fixes to ensure wrappers get setup correctly for the timeline
	tests.

	* tests/interactive/test-main.c:
	cast the symbol return pointer as (gpointer *) to avoid warning

	* tests/conform/test-pick.c:
	g_assert that the test passes, instead of using exit()

	* test/conform/ADDING_NEW_TESTS:
	Fixes a silly typo
2008-11-10 11:48:00 +00:00
Robert Bragg
603f936745 Bug 1162 - Re-works the tests/ to use the glib-2.16 unit testing
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'
2008-11-07 19:32:28 +00:00