Commit graph

12 commits

Author SHA1 Message Date
Andrea Canciani
0ce4face45 test: Use ARRAY_LENGTH() macro
Some tests hand-code ARRAY_LENGTH(). It is now provided by
cairo-test.h, so it can be reused.
2011-03-17 17:45:57 +01:00
Andrea Canciani
5f039f0f89 mesh: Rename cairo_pattern_mesh_* functions to cairo_mesh_pattern_*
This is consistent with the naming of most cairo types/functions
(example: cairo_foo_surface_*).

The substitution in the code has been performed using:

  sed -i 's/cairo_pattern_mesh_/cairo_mesh_pattern_/' <files>
2011-02-07 20:28:09 +01:00
Andrea Canciani
b164187ff6 test: Extend pattern-get-type and pattern-getters for mesh patterns
Add testing for mesh patterns to pattern-get-type and pattern-getters.
2011-01-01 13:05:13 +01:00
Chris Wilson
7db55b37d4 [test] Destroy pattern on error paths.
Destroy the pattern after encountering an error in pattern-getters test.
2009-03-18 09:44:33 +00:00
Chris Wilson
e90073f7dd [test] Build test suite into single binary.
Avoid calling libtool to link every single test case, by building just one
binary from all the sources.

This binary is then given the task of choosing tests to run (based on user
selection and individual test requirement), forking each test into its own
process and accumulating the results.
2008-10-31 12:30:11 +00:00
Chris Wilson
436c0c8be2 [test] Preparatory work for running under memfault.
In order to run under memfault, the framework is first extended to handle
running concurrent tests - i.e. multi-threading. (Not that this is a
requirement for memfault, instead it shares a common goal of storing
per-test data).  To that end all the global data is moved into a per-test
context and the targets are adjusted to avoid overlap on shared, global
resources (such as output files and frame buffers). In order to preserve
the simplicity of the standard draw routines, the context is not passed
explicitly as a parameter to the routines, but is instead attached to the
cairo_t via the user_data.

For the masochist, to enable the tests to be run across multiple threads
simply set the environment variable CAIRO_TEST_NUM_THREADS to the desired
number.

In the long run, we can hope the need for memfault (runtime testing of
error paths) will be mitigated by static analysis. A promising candidate
for this task would appear to be http://hal.cs.berkeley.edu/cil/.
2008-08-13 21:54:59 +01:00
Adrian Johnson
41a5700793 Fix undefined macro that was preventing the tests from compiling 2008-01-29 20:27:06 +11:00
Carl Worth
247e101199 Fix bitmap-font test by using near-equality for double comparison 2008-01-28 21:26:05 -08:00
Behdad Esfahbod
30b5f1baa8 [test] In pattern-getters test, log what went wrong 2007-03-13 16:50:10 -04:00
Carl Worth
9854d01a8d Fix leak in pattern-getters test (missing cairo_pattern_destroy) 2007-03-02 11:32:47 -08:00
Carl Worth
78ad834d81 Fix typo of , instead of || which was causing a test to be ignored
Thanks to a gcc warning for catching this one, (statement with
no effect, or similar).
2006-10-12 14:21:55 -07:00
Vladimir Vukicevic
303b529195 dash and pattern getter functions
Adds API functions for inspecting the current dash state, as well as
the contents of pattern objects:

  cairo_get_dash
  cairo_get_dash_count
  cairo_pattern_get_rgba
  cairo_pattern_get_surface
  cairo_pattern_get_color_stop_rgba
  cairo_pattern_get_color_stop_count
  cairo_pattern_get_linear_points
  cairo_pattern_get_radial_circles
2006-09-19 12:19:21 -07:00