Commit graph

721 commits

Author SHA1 Message Date
Behdad Esfahbod
a0bc2ada78 [test] Support passing extra valgrind flags
using EXTRA_VALGRIND_FLAGS make variable or CAIRO_EXTRA_VALGRIND_FLAGS
env variable.
2007-03-02 15:45:02 -05:00
Carl Worth
8c579ef835 More tightening of test cleanup to avoid valgrind complaints. 2007-03-02 12:30:14 -08:00
Carl Worth
9854d01a8d Fix leak in pattern-getters test (missing cairo_pattern_destroy) 2007-03-02 11:32:47 -08:00
Carl Worth
b52dda62fe Augment cairo_test_init with cairo_test_fini to avoid leak
Without this, any tests that were using cairo_test_init rather than
cairo_test would end up leaking a FILE* for the log file. So this
keeps valgrind much more happy with the test suite.
2007-03-02 11:31:13 -08:00
Carl Worth
7d6e21c7e2 Add even more XrmGetFileDatabase leaks to the valgrind suppressions file 2007-03-02 11:29:40 -08:00
Carl Worth
e054314e5e Add a couple of missing test cases to .gitignore 2007-03-02 09:34:46 -08:00
Carl Worth
02f2ece88d Fix leak in pdiff lpyramid
This was a leak in the test suite only, (and then only when tests failed).
2007-03-02 09:32:14 -08:00
Carl Worth
36590fd470 Add test of cairo_get_* after INVALID_RESTORE to nil-surface
This new test demonstrates a crash condition as reported here:

	evolution crash to _cairo_gstate_backend_to_user()
	https://bugs.freedesktop.org/show_bug.cgi?id=9906
2007-03-02 03:43:46 -08:00
Carl Worth
df2d42ac7f Merge branch 'radial-gradient-fixes' into cairo 2007-03-01 17:08:03 -08:00
Behdad Esfahbod
4ee6cda6e5 [test] Move .la dependencies around 2007-03-01 19:13:19 -05:00
Behdad Esfahbod
4b1f450f4c [test] Add more valgrind suppressions 2007-03-01 18:36:27 -05:00
Behdad Esfahbod
2acd5b5277 [test] Add leak-revealing path to rectilinear-stroke
Based on this thread:
http://lists.freedesktop.org/archives/cairo/2007-March/009860.html
2007-03-01 18:34:53 -05:00
Behdad Esfahbod
bd2cd2c868 [test] Plug a leak in the test suite 2007-03-01 18:14:33 -05:00
Carl Worth
d65455ed38 Add radial-gradient test case
Embarrassingly enough, the test suite previously never called
into cairo_pattern_create_radial at all. Unsurprisingly, this
has led to bugs creeping into the radial gradient implementation.
2007-03-01 13:16:38 -08:00
Behdad Esfahbod
07d61af809 [paginated] Automatically issue a final cairo_show_page()
This means, PS/PDF/SVG do not need the final cairo_show_page() anymore.
If there is any drawing in the page, a cairo_show_page() is done
automatically.
2007-02-28 13:46:27 -05:00
Behdad Esfahbod
ed75e24898 Implement cairo_get_scaled_font() 2007-02-27 20:09:46 -05:00
Behdad Esfahbod
153465bfe5 [test] Add ref images for new tests 2007-02-27 19:28:37 -05:00
Behdad Esfahbod
de0a6522b0 [test] Add tests that show xstep/ystep failures in PS/PDF backends
with surface patterns.  One test scaled the pattern up, another scales
down.  We observe that both PS and PDF are broken when scaling down.
This is the reason that PDF is failing in the fallback-resolution test
too.
2007-02-27 17:33:17 -05:00
Behdad Esfahbod
2d908e6a95 [test] Add a new, XFAIL, extend-pad test 2007-02-23 17:26:43 -05:00
Behdad Esfahbod
289ac33fa2 [PS] Fix surface patterns with transforms
Previously we were generating an image object with the desired
transform and then a pattern with only a translation.  This means,
the pattern was alwasys axis-aligned.  Obviously this does not
work correctly with repeated rotated patterns.

We now use an identity matrix for the image and put all the
pattern transformation (well, it's inverse) into the pattern.
This fixes the issue nicely.

The surface-pattern test is still failing even with a reference
image, because the gs rendering of the normal case and the
device-offset=25 case are different and both have seams.
2007-02-23 17:26:43 -05:00
Behdad Esfahbod
16013ced09 [test] Remove non-existing test extend-pad 2007-02-23 17:26:42 -05:00
Behdad Esfahbod
c87edd9e10 [test] Update surface-pattern test to include transformations
The surface-pattern test was very naive, painting a surface pattern
repeated at identity size.  With the new test, the surface pattern
is scaled and rotated.  This reveals a serious bug in the PS backend.
2007-02-23 17:26:42 -05:00
Behdad Esfahbod
3405fb870e [test] Increase size of extend-reflect test to see that pattern repeats 2007-02-23 17:26:42 -05:00
Behdad Esfahbod
5562050bcf Support CAIRO_EXTEND_REFLECT on surface patterns
We do this through a hack, that is, we make
_cairo_pattern_acquire_surface to return a surface that has four
copies of the original surface painted such that this image can
be simply repeated to get the effect of reflecting the original
surface.

This fixes the formerly XFAIL test extend-reflect.
2007-02-23 17:26:42 -05:00
Behdad Esfahbod
a57bc6b697 [test] Add ref image for extend-reflect 2007-02-23 17:26:41 -05:00
Behdad Esfahbod
7d91c8a2cb [test] Fix syntax typo in text-rotate 2007-02-21 15:47:43 -05:00
Behdad Esfahbod
155a1b48f6 [test] Remove text-rotate test from XFAIL as the bugs are fixed now
All missing is subpixel text positioning, but we don't need an XFAIL test
to remind us for that.
2007-02-21 13:52:17 -05:00
Behdad Esfahbod
b54174e917 [PS] Fix rotated image pattern emission by correcting setting the bbox
The bug was that the bounding box of the image was computed by transforming
the vector (width,height) and then using 0,0,width,height as the bounding box.
This is obviously wrong.  We use _cairo_matrix_transform_bounding_box() now.
This fixes the XFAIL test rotate-image-surface-paint.
2007-02-21 13:43:08 -05:00
Behdad Esfahbod
6ae4a4fd71 [test] Remove ft-text-vertical-layout-type1 from XFAIL
and update reference images.  This test was fixed some time ago
where I disabled type1 subsetting for vertical layouts, then
turned XFAIL again when Carl Worth didn't have the same fonts as me.
I've not updated reference images to work on FC6 and hoping that it
works for Carl too.
2007-02-21 12:57:09 -05:00
Behdad Esfahbod
c6a067f967 [test] Add test case for bug #7965 to the get-path-extents test 2007-02-21 11:50:24 -05:00
Vladimir Vukicevic
28c1e46b8e [quartz] rename test override images from nquartz to quartz 2007-02-20 13:22:11 -08:00
Vladimir Vukicevic
4c201723ce [quartz] Rename nquartz to quartz 2007-02-20 12:15:35 -08:00
Behdad Esfahbod
2335a23a16 [test/Makefile.am] Document why svg2png and pdf2png use LDADD
This is to make librsvg and poppler to use the compiled cairo instead
of whatever is on the system, such that the test suite does not depend
on a good version of cairo being installed already.
2007-02-20 01:01:39 -05:00
Jeff Muizelaar
afd5f92195 Fix several issues with dashed stroking code, particularly 'leaky-dash'
Adds some state, 'dash_starts_on', to keep track of whether a dashed path
starts with dash_on or not. This fixes the 'leaky-dash' bug (#4863) and
some other degenerate cases. The new version is, in my opinion,
considerably cleaner and more understandable than the old code.

Finally, the rewrite changes the behaviour of dashing to add degenerate
caps around corners that start at the same place as a dash begins. This
matches the behaviour seen in acroread.

This rewrite is based on an initial rewrite done by Jeff Smith.
2007-02-19 16:06:57 -05:00
Jeff Muizelaar
74ded42327 Add a new dashing test
This new dashing test, based on some code from Jeff Smith, does a pretty
good job exploring all the cases that the dashing code needs to deal with.
2007-02-19 16:06:56 -05:00
Jeff Muizelaar
1c1697398c Add two new test cases to degenerate-path test
These new cases deal with degenerate paths at the end of dashed paths. They
currently fail.
2007-02-19 16:06:56 -05:00
Carl Worth
51ca187d3e Mark test/rotate-image-surface-paint as XFAIL
This test has always failed with the ps backend since the test
was initially written.
2007-02-13 23:55:03 -08:00
Carl Worth
d6d1767f9a Increase pthread-show-text thread count and add cairo_select_font_face to expose more bugs. 2007-02-13 10:47:06 -08:00
Carl Worth
fc3ce1e80a test/pthread-show-text: Increease iterations to expose locking bug
With 50 iterations I'm seeing the following assertion failure:

cairo-hash.c:477: _cairo_hash_table_insert: Assertion `NOT_REACHED' failed.

Thanks to Jan Slupski <jslupski@juljas.net> for pointing out this bug.
2007-02-06 20:41:58 -08:00
T Rowley
0b7ba5ccfa Add linear-gradient-reflect test case
This testcase works before the
e9bef30d2b landing, and has visual
artifacts afterwards.
2007-02-02 16:37:27 -08:00
Carl Worth
26ef4746e6 Add two tests of cairo_surface_finish to test/nil-surface.c
This tests calling cairo_surface_finish with either NULL or
with a nil surface, (either currently causes a crash).
2007-02-01 15:21:12 -08:00
Carl Worth
ebc1cd91f8 Add rotate-image-surface-paint test case
This test exercises a clone_similar extents bug noticed by
Benjamin Otte. As expected, the xlib backend fails due to
that bug, (and interestingly, the ps backend is showing a
failure as well).
2007-01-26 11:43:27 -08:00
Carl Worth
d6bb0d7720 .gitignore: Add text-glyph-range 2007-01-20 01:47:06 -08:00
Carl Worth
d91d5d12f3 Add new scale-down-source-surface-paint test
This new test case demonstrates a bug in the PDF backend, (source
surface patterns are repeated even with a pattern extend of NONE).

Thanks to Romuald <mydevel@free.fr> and Claudio Saavedra
<csaavedra@alumnos.utalca.cl> for pointing out the bug.
2007-01-19 16:47:31 -08:00
Vladimir Vukicevic
d08502d939 Merge branch 'master' of git+ssh://git.cairographics.org/git/cairo 2007-01-18 16:50:41 -08:00
Vladimir Vukicevic
eefcfbf5a1 [nquartz] add test reference files for nquartz backend 2007-01-18 16:49:42 -08:00
Carl Worth
28d6a228f0 Fix cairo_get_dash and cairo_get_dash_count APIs
Make these functions consistent with other cairo_get functions
by making cairo_get_dash_count return the count directly, and
removing the cairo_status_t return value from cairo_get_dash.
2007-01-18 13:09:23 -08:00
Robert O'Callahan
4e1c2b1ad8 Rename cairo_copy_clip_rectangles to cairo_copy_clip_rectangle_list 2007-01-17 15:07:31 -08:00
Brian Ewins
9e332eadad [test] Test handling of out-of-range glyph indexes. (#9530)
Adds a test for missing and out-of-range glyph indexes. The expected
ATSUI renderings are added as references, please replace these with
FT renderings when they become available.
2007-01-16 01:25:53 +00:00
Behdad Esfahbod
ab29396ef9 [test] Add new test text-zero-len (#5177)
The test passes an empty string to cairo_show_text, cairo_text_path, and
cairo_text_extents, and NULL and an invalid pointer, with zero num_glyphs to
cairo_show_glyphs, cairo_glyph_path, and cairo_glyph_extents.
2006-12-28 20:00:16 -05:00