Commit graph

1879 commits

Author SHA1 Message Date
Andrea Canciani
1501c86536 test: Do not open files in non-existing dirs
The output directory should be made before trying to open log files in
it.

Fixes the bug causing cairo-test-suite to log to stderr on the first
run (i.e. when test/output does not exist).
2011-11-12 20:49:08 +01:00
Andrea Canciani
603ea229b5 test: Use cairo_test_list_t for the main test list
Instead of embedding the pointer in the test structure, consistently
use the cairo_test_list_t structure for test lists.

This cleans up the code as the reverse-list operation can be reused.

Moreover this makes the code clearer, because each test list is now
independent and has no way to know about other test lists.
2011-11-12 20:49:08 +01:00
Andrea Canciani
de6a1e68fe Remove useless checks for NULL before freeing
This patch has been generated by the following Coccinelle semantic patch:

// Remove useless checks for NULL before freeing
//
// free (NULL) is a no-op, so there is no need to avoid it

@@
expression E;
@@
+ free (E);
+ E = NULL;
- if (unlikely (E != NULL)) {
-   free(E);
(
-   E = NULL;
|
-   E = 0;
)
   ...
- }

@@
expression E;
@@
+ free (E);
- if (unlikely (E != NULL)) {
-   free (E);
- }
2011-11-12 20:49:08 +01:00
Andrea Canciani
c65d4e35dc Use xstrdup instead of xmalloc when possible
Don't open code xstrdup, just use it.
2011-11-12 20:49:08 +01:00
Andrea Canciani
6dfb12c7d7 test: Reuse cairo_test_logv()
cairo_test_log() can be implemented on top of cairo_test_logv() to
ensure that their behavior is consistent.
2011-11-12 20:49:08 +01:00
Andrea Canciani
549b1f8d4b boilerplate: Remove unused thread id parameter
The thread id is not used anymore (it is always == 0), so it can be
removed.
2011-11-12 20:49:08 +01:00
Andrea Canciani
b07b242220 test: Remove unused thread field
The multi-threaded test path does not exist anymore and the ctx->thread
field is always 0, hence it can be removed.
2011-11-12 20:49:08 +01:00
Andrea Canciani
6ef9779a6f test: Remove dead code
This code is unused and can be removed.
2011-11-12 20:49:08 +01:00
Andrea Canciani
97b219a5e7 test: Re-enable pass-through
The pass-through test was not updated to the current test conventions
and was not enabled in the Makefiles.
2011-11-12 20:49:08 +01:00
Andrea Canciani
c8b5d270f6 Improve the documentation of the flags
Some utilities were providing incorrect or incomplete usage
information.
2011-11-12 20:49:08 +01:00
Andrea Canciani
6a0ba30303 Sort option flags
Keep the option flags in alphabetical order. This makes it easier to
check for collisions or missing handlers.

Avoids an internal error when passing flags -c, -r or -v to
cairo-analyse-trace.
2011-11-12 20:49:08 +01:00
Andrea Canciani
f96e78fa54 Silence some 'unused var' warnings 2011-11-09 13:56:50 +01:00
Uli Schlachter
9208df1630 test: Add text-antialias-subpixel-{,v}{bgr,rgb}
There were no tests for any subpixel order but rgb, so let's write something for
all four possibilities.

This is mostly copy&paste from test/text-antialias.c (and
text-antialias-subpixel-rgb does the same thing as text-antialias-subpixel).

Test for: https://bugs.freedesktop.org/show_bug.cgi?id=40456

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-13 13:40:20 +02:00
Chris Wilson
ea50ca6883 test: Add clip-polygons
To exercise the recent bug found in handling empty clip surfaces.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-10-12 15:10:34 +01:00
Uli Schlachter
4092e90be5 test: Add clip-double-free
This test tries to exercise a double free bug in the clipping code.

My webkit-based browser recently crashed a lot. Here is the reason why.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-09 09:33:37 +02:00
Uli Schlachter
b9e5cd9572 create-from-png*: Test mark_dirty with mime data
This currently hits the following assertion:

lt-cairo-test-suite: cairo-surface.c:1381: cairo_surface_mark_dirty_rectangle:
Assertion `! _cairo_surface_has_mime_data (surface)' failed.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41409

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-09 09:21:13 +02:00
Uli Schlachter
38ce0850b8 test: Add mime-surface-api
This test checks if setting and unsetting mime data works correctly. E.g. this
verifies that we get the same pointer back which we passed in (=no copy made).

This test currently crashes in its last call to cairo_surface_get_mime_data().

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-04 21:00:23 +02:00
Chris Wilson
80fff70e6c test: Add clip-rectilinear
Exercise the clipping code with a rectilinear path (rather than a set of
boxes as per usual).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-30 16:31:06 +01:00
Chris Wilson
30eac7b2c5 test: Add line-width-large-overlap
Exercise the case of stroking a box with a pen wider than the box
itself, a variation on line-width-overlap suggested by Paulo Zanoni.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-29 00:24:18 +01:00
Rob Bradford
82a7eac1de build: Specify the reference images as a directory for EXTRA_DIST
Rather than having the reference images individually listed in
test/Makefile.refs the whole directory can be included in the EXTRA_DIST
block.

This removes the need to have the check-ref-missing Makefile target.
2011-09-27 15:44:57 +01:00
Chris Wilson
b8ae60f619 test: Refresh reference images
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-26 14:55:03 +01:00
Chris Wilson
303893681f test/random-clips: Paint clip to highlight the issues
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-26 13:30:35 +01:00
Chris Wilson
9c56df3904 test: Mark the record-select-font-face as XFAIL
The recording surface has no knowledge of the target surface when it
generates the scaled font and informs the client about the kerning and
metrics. This results in an unfortunate slight misalignment when
replaying the glyphs against the ideal case.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-23 23:34:29 +01:00
Chris Wilson
70ac21f7bb test: Refresh rotated-clip reference 2011-09-23 23:32:37 +01:00
Chris Wilson
606e9e1c9e test: Refresh tighten-bounds reference image
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-23 23:28:50 +01:00
Chris Wilson
9a366cff2c test: Redefine success for miter-precision
On review, that segment does exist and should not have been removed by
numerical errors!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-23 22:48:46 +01:00
Chris Wilson
2c34f028a7 test: Exercise scaling from an atlas through a subsurface
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-23 13:37:51 +01:00
Chris Wilson
9b3b84976a test: refresh text-pattern reference 2011-09-23 13:20:32 +01:00
Chris Wilson
7e5e2dd5e1 test/create-from-png: Update to point to new reference/ images
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-23 13:20:14 +01:00
Adrian Johnson
d43f6d7459 test: make text-pattern draw with both opaque and translucent patterns
Poppler renders the translucent PDF output of this test correctly with
cairo 1.10.2 but fails with current git.
2011-09-22 23:41:35 +09:30
Adrian Johnson
b30b0c14cb test: Add stroke-pattern
Poppler renders the PDF output of this test correctly with cairo 1.10.2 but fails with current git.

Commenting out the cairo_translate makes the PDF output render correctly with current git.
2011-09-22 22:43:07 +09:30
Chris Wilson
0e95215c01 test/trace: Hack to dump out per-context images and traces
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-21 11:19:04 +01:00
Chris Wilson
2209ec5a15 test: Make cairo_test_suite depend upon the any2ppm exectuable on all platforms
On some platforms, executables have an extension which confuses
automake into building an entirely different binary.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-18 08:52:46 +01:00
Dave Yeo
fdd54d2b79 Fix the number of parameters for cairo_os2_surface_set_size()
test/error-setters.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-18 08:50:00 +01:00
Adrian Johnson
b13c2270f5 test: refresh pdf mask ref images 2011-09-18 13:32:32 +09:30
Chris Wilson
fc011bfcb9 test: Record the current status of radial-outer-focus as xfail
Debate rages as to the correct way to handle this. In some ways the
current output is expected due to the numerical instability in handling
the inner-focus-on-the-outer-circle. However, the result looks less than
desirable so some solution (which may not be inside cairo per-se) is
sought.
2011-09-17 12:28:33 +01:00
Chris Wilson
3fde219487 test: Refresh reference images for spans/traps
I found a bug in my SSE2 lerp implementation which resolved quite a few
failures.
2011-09-16 17:44:33 +01:00
Chris Wilson
f3a9a0c9e6 test: Add a1-fill
Capture the bug report:
https://bugs.freedesktop.org/show_bug.cgi?id=31604

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-16 16:25:45 +01:00
Krzysztof Kosinski
f09361cff1 test: Add radial-outer-focus
Numerical instability in the computation of gradients leads to random
results.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40918
2011-09-16 16:03:23 +01:00
Chris Wilson
c5295981c6 test: Update reference images for test-base
Uli Schlachter spotted that I had create reference images with sharp
edges for his tighten-bounds test case, exactly as if I had ignored
unaligned clip boxes...

Turns out I had removed the code to handle them...
2011-09-16 15:04:14 +01:00
Adrian Johnson
f1c8c00f16 test: refresh some pdf/ps refs 2011-09-16 23:04:53 +09:30
Adrian Johnson
12ee7989a0 test: refresh some pdf/ps refs 2011-09-16 22:52:05 +09:30
Chris Wilson
0aabde2314 test: Add bug-bo-ricotz
Exercises an assertion failure found by Rico Tzschichholz.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-16 13:48:09 +01:00
Chris Wilson
e7bcf1fd79 test: Hack cairo-test-trace to write at trace for all contexts
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-16 13:48:09 +01:00
Adrian Johnson
983cfb2f54 test: add mask-alpha ps ref 2011-09-16 21:37:58 +09:30
Chris Wilson
898e63bfc1 test: Replace xlib reference images with the traps references
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-16 11:50:50 +01:00
Chris Wilson
fcea0f8e08 test: Use the test-traps as the reference images for xlib/xcb
The test-traps provides a reference implementation of the
traps-compositor as used by xlib, so we can use it to generate the
reference images as well. (Of course checking that test-traps is itself
correct and only differs in the renderer! ;-)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-16 11:09:22 +01:00
Chris Wilson
62e1ded35c test: Update couple of refs for the improved mono rasteriser
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-15 17:10:43 +01:00
Chris Wilson
e5d890e1ea test: Update refernece dir for create-from-png-stream
It tries to load its reference image and fails because I moved it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-09-15 17:06:51 +01:00
Chris Wilson
8e827e2cbb test: Record the failure of recent freetype libraries for type1 vertical layout 2011-09-15 17:02:12 +01:00