1
0
Fork 0
Commit graph

113 commits

Author SHA1 Message Date
Emmanuele Bassi
06b00f9dfc Remove units for Entry and Label
ClutterText should supercede all unit tests for ClutterLabel and
ClutterEntry.
2008-12-11 12:13:26 +00:00
Emmanuele Bassi
b1c366a143 Add Text::get_chars() implementation and tests
The clutter_text_get_chars() function returns a section of the
contents of the Text actor, delimited by a start and an end position.

This commit adds the implementation for that function and a test
unit that guarantees the offset-to-bytes computations are correct.
2008-12-11 11:59:50 +00:00
Emmanuele Bassi
94789e3cc3 Add a separate test unit for ClutterText
Instead of changing the unit for ClutterEntry, we add a new
test unit specifically for ClutterText so that we can later tweak
it specifically for the behaviour changes needed to make ClutterText
work better.
2008-12-11 11:45:37 +00:00
Emmanuele Bassi
8a537b6299 2008-12-08 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/Makefile.am:
	* clutter/clutter.h: Add ClutterBindingPool to the build.

	* clutter/clutter-binding-pool.c:
	* clutter/clutter-binding-pool.h: Add ClutterBindingPool, a data
	structure meant to hold (key symbol, modifiers) pairs and associate
	them to a closure. The ClutterBindingPool can be used to install
	key bindings for actors and then execute closures inside the
	key-press-event signal handlers, removing the need for big
	switch() or if() blocks for each key.

	* clutter/clutter-event.c: Consistently use "key symbol" instead
	of "key value".

	* clutter/clutter-event.h: Add more modifier masks.

	* clutter/clutter-marshal.list:

	* tests/conform/Makefile.am:
	* tests/conform/test-binding-pool.c:
	* tests/conform/test-conform-main.c: Add ClutterBindingPool
	conformance test.

	* tests/interactive/Makefile.am:
	* tests/interactive/test-binding-pool.c: Add interactive test (and
	example code) for the ClutterBindingPool usage.
2008-12-08 13:57:10 +00:00
Neil Roberts
1a63414966 Bug 1252 - Merge ClutterBehaviourPath and ClutterBehaviourBspline
* clutter/clutter-path.h:
	* clutter/clutter-path.c: Implementation of new ClutterPath object
	to represent a path combining straight line and bezier curve
	elements.

	* clutter/clutter.h: Include clutter-path.h and remove
	clutter-behaviour-bspline.h

	* tests/interactive/test-threads.c (test_threads_main):
	* tests/interactive/test-script.c:
	* tests/interactive/test-behave.c (test_behave_main): Use new path
	API

	* clutter/clutter-effect.c: Use the new ClutterBehaviourPath API.

	* clutter/clutter-bezier.h:
	* clutter/clutter-bezier.c: Moved bezier curve handling code out
	from clutter-behaviour-bspline.c to a separate file.

	* clutter/clutter-behaviour-path.h:
	* clutter/clutter-behaviour-path.c: Reimplemented to work with a
	ClutterPath

	* clutter/clutter-behaviour-bspline.h:
	* clutter/clutter-behaviour-bspline.c: Removed

	* clutter/Makefile.am: Add clutter-path and clutter-bezier, remove
	clutter-behaviour-bspline.

	* tests/conform/test-path.c: New automatic test for ClutterPath
	consistency

	* tests/conform/test-conform-main.c (main): Add test_path

	* tests/conform/Makefile.am (test_conformance_SOURCES): Add
	test-path.c

	* clutter/clutter-sections.txt: Add ClutterPath docs

	* clutter/clutter.types:
	* clutter/clutter-docs.xml:
	* doc/reference/clutter/clutter-animation-tutorial.xml: Remove
	mention of ClutterBehaviourBspline

	* clutter/clutter-marshal.list: Add VOID:UINT
2008-12-05 13:13:37 +00:00
Neil Roberts
72f2fc22ad * tests/conform/test-backface-culling.c: New test for backface
culling

	* tests/conform/test-conform-main.c (main): Add
	/texture/test_backface_culing

	* tests/conform/Makefile.am (test_conformance_SOURCES): Add
	test-backface-culling.c
2008-11-28 17:36:37 +00:00
Emmanuele Bassi
ab9464b33d 2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com>
* tests/conform/test-conform-main.c (main): Do not run the
	conformance test suite if we are on X11 but we do not have
	a DISPLAY available. Some of the tests require a DISPLAY,
	and everything passes through a clutter_init() call which will
	fail anyway. If we are running make distcheck on an headless
	box we might as well just skip the conformance test suite
	without a meaningless error.
2008-11-18 13:06:02 +00:00
Neil Roberts
56fa77a5db * tests/conform/test-conform-main.c (main): Fixed a typo in the
name of the path for test_realized.
2008-11-18 12:16:00 +00:00
Emmanuele Bassi
1456949193 2008-11-12 Emmanuele Bassi <ebassi@linux.intel.com>
* tests/conform/Makefile.am:
	* tests/conform/test-conform-main.c:
	* tests/conform/test-paint-opacity.c: Add test unit for label,
	rectangle and paint opacity.
2008-11-12 14:41:01 +00:00
Robert Bragg
16897e0729 Bug 1164 - Implements the proposed Mesh API
* clutter/cogl/cogl-mesh.h
	* clutter/cogl/cogl-types.h
	* clutter/cogl/cogl.h.in
	* clutter/cogl/common/Makefile.am
	* clutter/cogl/common/cogl-mesh-private.h
	* clutter/cogl/common/cogl-mesh.c
	* clutter/cogl/gl/cogl-context.c
	* clutter/cogl/gl/cogl-context.h
	* clutter/cogl/gl/cogl-defines.h.in
	* clutter/cogl/gl/cogl.c
	* clutter/cogl/gles/cogl-context.c
	* clutter/cogl/gles/cogl-context.h
	* doc/reference/cogl/cogl-docs.sgml
	* doc/reference/cogl/cogl-sections.txt:
	The Mesh API provides a means for submitting an extensible number of
	per vertex attributes to OpenGL in a way that doesn't require format
	conversions and so that the data can be mapped into the GPU (in vertex
	buffer objects) for - hopefully - fast re-use.

	There are a number of things we can potentially use this API for, but
	right now this just provides a foundation to build on. Please read
	the extensive list of TODO items in cogl-mesh.c for examples.

	Please refer to the cogl-mesh section in the reference manual for
	documentation of the API.

	* tests/conform/Makefile.am
	* tests/conform/test-conform-main.c
	* tests/conform/test-mesh-contiguous.c
	* tests/conform/test-mesh-interleved.c
	* tests/conform/test-mesh-mutability.c:
	Privides basic coverage testing for the mesh API.
2008-11-10 18:53:14 +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
Emmanuele Bassi
d4573ba10c 2008-11-08 Emmanuele Bassi <ebassi@linux.intel.com>
* tests/conform/Makefile.am:
	* tests/conform/test-actor-invariants.c:
	* tests/conform/test-conform-main.c: Move the actor invariants
	unit to the conform section of the test suite.

	* tests/interactive/Makefile.am:
	* tests/interactive/test-entry-auto.c:
	* tests/interactive/test-invariants.c: Remove the entry-auto
	and invariants test, since those two belong to the conform
	section.
2008-11-08 15:56:22 +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