Commit graph

1016 commits

Author SHA1 Message Date
Carl Worth
55e0dddf04 Add cairo_path_extents testing to several cases missing it
With these degenerate shapes, cairo_path_extents still returns
a zero-area rectangle, but with a non-zero offset.
2008-01-21 14:45:06 -08:00
Carl Worth
c15cab8b68 Correct near-pangram to be an actual pangram
This wasn't affecting the test quality at all, but it did annoy
me to see this mistake.
2008-01-21 13:34:53 -08:00
Carl Worth
ed695bdb9b Define repeated string literal once 2008-01-21 13:33:46 -08:00
Brian Ewins
4177208be6 [cairo] Add cairo_path_extents()
This new function gets the extents of the current path, whether
or not they would be inked by a 'fill'. It differs from
cairo_fill_extents() when the area enclosed by the path is 0.

Includes documentation and updated test.
2008-01-21 12:04:32 -08:00
Carl Worth
50d0767c8b Add a1-image-sample and a1-traps-sample tests
Both of these currently fail due to bugs in the way pixman does
its sampling.
2008-01-18 12:41:57 -08:00
Chris Wilson
0086db893c [cairo-font-options] Treat NULL as a default cairo_font_options_t
Interpret a NULL cairo_font_options_t as the default values - i.e
as if it were a fresh pointer returned by cairo_font_options_create().
2008-01-17 22:38:02 +00:00
Chris Wilson
630536f176 [test/extend-*] Add various cairo_pattern_set_extend() test cases.
Add various test cases to exercise
_cairo_pattern_acquire_surface_for_surface(), most notably using similar
source surfaces to provide coverage of the non-image surface branch.
2008-01-17 17:45:17 +00:00
Chris Wilson
7b1a0eddac [test/get-path-extents] Exercise cairo_scaled_font_text_extents()
Compare cairo_scaled_font_text_extents() to cairo_text_extents() in
order to provide test coverage of cairo_scaled_font_text_extents().
2008-01-17 13:51:21 +00:00
Chris Wilson
aec7ae67aa [test/text-zero-len] Test the public cairo_scaled_font_* with NULLs.
Pass NULL to cairo_scaled_font_(text|glyph)_extents() to test the
consistency of the extents API.
2008-01-17 13:32:04 +00:00
Chris Wilson
390e22894b [test/in-fill-trapezoid] Add a few holes.
Complete the coverage of _cairo_trap_contains() by cutting holes out of
the simple shapes.
2008-01-17 13:13:40 +00:00
Chris Wilson
da9c43329a [test/in-fill-trapezoid] Add test to exercise _cairo_trap_contains().
A simple test to provide coverage of _cairo_trap_contains(), though
not yet seeking boundary conditions.
2008-01-17 11:50:51 +00:00
Chris Wilson
dd13a00541 [test/get-path-extents] Check extents of degenerate paths.
Ensure that degenerate paths have zero extents.
2008-01-17 11:50:32 +00:00
Chris Wilson
9ebfa8b5fb [Makefile.am] Couple check-ref-missing into release-check
Verify that all the reference images checked into git will be included
within the distribution tarball as early as possible in the release
process.
2008-01-16 23:30:15 +00:00
Chris Wilson
2621a323a0 [test/dash-curve] Add a new test case for dashes along splines.
Modify the dash-state test case and use curves instead of lines -
exercises _cairo_stroker_curve_to_dashed() and degenerate splines.
2008-01-16 23:24:41 +00:00
Carl Worth
5c3a0b5c00 Add miter-precision-ref.png tothe distribution. 2008-01-16 10:22:44 -08:00
Carl Worth
e49db8ed3e Fix create-for-stream test to log its failure properly
Without this, a failure of this test won't be nicely reported
in the post-make-check summary. (Also fix a silly little typo
in the svg-clip test.)
2008-01-16 08:16:06 -08:00
Chris Wilson
968eaf3c44 [cairo-xlib] Fixup --disable-xlib-xrender
Fixup the headers and boilerplate to compile and run correctly when
configured with --disable-xlib-xrender.
2008-01-15 13:08:53 +00:00
Chris Wilson
a5e5c1b5b0 [test] Add a custom hook to summarise the failures.
Add a check-local hook that scans the log fails and displays a list
of failed tests (and the failing targets).
2008-01-13 15:00:58 +00:00
Chris Wilson
973d5fa8a5 [test] Sort TESTS
A couple of tests were out of order, causing a bit of confusion in the
user.
2008-01-12 11:04:03 +00:00
Chris Wilson
ac98c9e572 [test/rel-path] Check that invalid relative paths raise an error.
Check that NO_CURRENT_PATH is raised if a relative path op is used
on a new path.
2008-01-12 10:49:48 +00:00
Chris Wilson
864dab828b [test/text-zero-len] Test passing NULLs to the API.
Check that the public API handles NULL - at the moment the code
is a little inconsistent and crashes!
2008-01-12 10:28:16 +00:00
Chris Wilson
6418a8be87 [test/.valgrind-suppressions] Update for amd64/sid
Update the valgrind suppressions for the libz and Xrm spam.
2008-01-10 22:14:31 +00:00
Chris Wilson
cbe8d3855e [test] Fixup make check for mingw
Add EXEEXT to TESTS so that mingw builds the correct target.
2008-01-10 17:10:12 +00:00
Chris Wilson
9ae4b219e1 [test/solid-pattern-cache-stress] Check for drand48().
Apply an alternative rand() function if drand48() is not available for
the platform.
2008-01-10 14:47:16 +00:00
Keith Packard
81e029edda Add new miter-precision test. Checks miter joins at many scales.
This demonstrates an error in cairo where miter joins are replaced with
bevels at high scale factors due to a test added to eliminate wild miters
drawn when the line faces are nearly parallel.
2008-01-03 18:24:24 -08:00
Chris Wilson
c67d99787c [test/surface-pattern-big-scaled-down] Kill the surface leaks.
Destroy the surface and pattern after use.
2008-01-03 18:01:43 +00:00
Chris Wilson
6a7a07adf9 [test] Update distribution list of ref images.
Add missing *-ps-rgb24-ref.png images, and a couple of tests to .gitignore.
2008-01-03 17:35:06 +00:00
Chris Wilson
146484e312 [valgrind] Update zlib suppressions.
Match the zlib library as found on hardy+dbgsym.
2007-12-20 21:21:54 +00:00
Chris Wilson
3bf06c3366 [test/*] Create new surfaces using the group target.
cairo_get_target() returns the original surface passed to
cairo_create(), and not the current destination as required when
testing drawing to the same surface using multiple contexts.

For completeness we also use the group target when creating similar
surfaces within the tests (to check that similar surfaces of similar
surfaces also work).
2007-12-20 21:21:32 +00:00
Chris Wilson
14454e12d8 [cairo-test] Wrap test function with cairo_save/restore().
Restore the context to the original state before blitting the
group surface in order to remove any residual state such as a clip path.
2007-12-20 17:51:56 +00:00
Chris Wilson
281b11aef1 [cairo-test] Use CAIRO_OPERATOR_SOURCE when painting the group surface.
To correctly copy a surface onto the destination irrespective of its
content requires the SOURCE operator. Forgetting to do so here causes
uninitialized pixels to be mixed into the result and the failure of
many tests for the similar surface. Oops...
2007-12-20 17:12:08 +00:00
Chris Wilson
ed3fccec01 [pdiff] Avoid the memleak for small surfaces.
Allocate the arrays after the guard against small surfaces to avoid
leaking them.
2007-12-20 14:13:12 +00:00
Brian Ewins
b81c8473bd [test] add test for gradient with no stops
Boris Zbarsky reported a bug where having zero stops in a
gradient pattern would crash in the quartz surface. This
test checks for that case. Mozilla bug#407104.

This also crashes testing pdf; and the ps, svg surfaces
look suspicious (they reference stops[0]) but I havent
been able to test them yet.
2007-12-06 21:31:10 +00:00
Vladimir Vukicevic
2c25033e14 [quartz] Handle creating 0x0 surfaces
Make all 0x0 surfaces be no-ops when used in a rendering operation.
2007-12-04 13:50:49 -08:00
Emmanuel Pacaud
3554c31e3d [SVG] Add missing image to REFERENCE_IMAGES list. 2007-11-10 10:43:43 +01:00
Emmanuel Pacaud
8edc3ed485 Merge branch 'master' of git+ssh://emmanuel@git.cairographics.org/git/cairo 2007-11-10 10:10:50 +01:00
Emmanuel Pacaud
b68968ffd1 [SVG] Fix opacity of combined stroke and fill.
When emitting combined stroke and fill, cairo SVG backend was using the opacity
two times, instead of using fill-opacity and stroke-opacity, leading to
incorrect output.

I've updated the mask test reference images for the SVG output, since it seems
there's a bug in librsvg when fill-opacity is used in the mask image.
I've checked the SVG output with batik, and it looks fine.
2007-11-10 10:07:12 +01:00
Brian Ewins
77e9b05b2b [test] support using a previous build as a reference
Allow using a previous test output directory as a source of
reference images. To make use of this, set the environment
variable 'CAIRO_REF_DIR' to point at an old test directory,
relative to the current test directory.

This is useful for testing backends when reference images haven't
been created yet, or which the current reference image structure
can't accomodate, like multiple font backends.
2007-11-10 01:34:03 +00:00
Brian Ewins
f8ee0cdf18 [test] Link to the correct reference image.
The generated test html guesses the names of the reference
images used in the tests. This is quite often wrong, and
makes it harder to change policy in cairo-test. Teach
make-html.pl to parse the log for the path to the reference image.
2007-11-10 01:34:01 +00:00
Brian Ewins
15fc1bbefb [test] log tested paths so that they can be parsed.
The test logs currently do not record the paths of
image output, the reference images tested against, and
the diffs created. This means that make-html.pl has to
duplicate the policy in cairo-test.c. Fix this by teaching
cairo-test.c to log the paths.
2007-11-10 01:33:47 +00:00
Chris Wilson
641215b2b0 [test/clip-all] Combine text and everything clipped out.
https://bugs.freedesktop.org/show_bug.cgi?id=13084 demonstrates a
regression where the clip is ignored by the xlib backend whilst
rendering text. Therefore we extend the current test cases to combine
a clip that represents everything clipped out with the rendering of
text. For completeness, we add a new test case that exactly mimics the
sequence of cairo operations that lead to the discovery of this bug -
namely the rendering of text with an empty clip path.
2007-11-06 13:28:10 +00:00
Behdad Esfahbod
570714b2b4 [test/fallback-resolution] set tolerance to a large value to see how it performs
in different fallback resolutions.
2007-11-05 13:23:40 -05:00
Behdad Esfahbod
5acbef2021 [test] fallback-resolution: center text 2007-11-05 13:23:35 -05:00
Chris Wilson
6d2615d449 [test/degenerate-pen] Add missing return value.
Carl - he likes to test us occasionally to make sure we're paying
attention. Well, that's the excuse I use...
2007-11-02 09:17:59 +00:00
Carl Worth
ee5dc04aaf Add missing images to REFERENCE_IMAGES list
Otherwise, these don't get included in the generated tar file
and the test suite doesn't pass when run from that tar file,
(like 'make distcheck' tests).
2007-10-30 22:33:24 -07:00
Carl Worth
5e76f65284 Add degenerate-pen test case.
This demonstrates the assertion failure pointed out by
Benjamin Otte here:

	[cairo] Assertion 'i < pen->num_vertices' failed in 1.4.10
	http://lists.cairographics.org/archives/cairo/2007-August/011282.html
2007-10-30 17:00:33 -07:00
Chris Wilson
bb6d36561c [test/get-path-extents] Add link to bug report.
Add a link to the original bug report for the broken extents with arcs.
[http://bugs.freedesktop.org/show_bug.cgi?id=7245]
2007-10-27 17:29:54 +01:00
Chris Wilson
483ebe866d [cairo-test] Remove executable flag from source files.
chmod a-x test/cairo-test.[ch]
2007-10-24 19:33:22 +01:00
Brian Ewins
7072959e3d Fix to support new similar tests.
The patch to repeat tests for similar surfaces changed the
format of the test log files, which were parsed to produce
index.html. This fixes the parser to understand those changes.
2007-10-20 13:52:08 +01:00
Chris Wilson
081507a09e [cairo-test] Repeat tests for similar surfaces.
Having noticed strange discrepancies creeping into similar surfaces
whilst working on the xlib backend, I thought it wise to also run
the test harness against similar targets. For consistency, only
targets whose similar surface use the same backend are included.

This can be disabled by exporting CAIRO_TEST_IGNORE_SIMILAR=1.
2007-10-20 00:15:34 +01:00