Commit graph

1226 commits

Author SHA1 Message Date
Chris Wilson
c13a09ddb4 [test] Use a different jpeg image for mime-data
Detect when we successfully encode the JPEG data from the mime-type by
using a completely image.
2008-11-04 13:03:24 +00:00
Chris Wilson
8407470409 [test] Adapt pdf-mime-data for non-srcdir build.
Need to look for reference/input images from srcdir as well.
2008-11-04 13:03:24 +00:00
Chris Wilson
8007618837 [test] Fix compilation of imagediff.
imagediff broke once again.
2008-11-04 13:03:24 +00:00
Adrian Johnson
73bc278c7a Add pdf mime data test
To test that images in PDF files correctly embedded the mime data.
2008-11-04 22:39:36 +10:30
Chris Wilson
43e2370b02 [test] Update extend-pad.
extend-pad was not a clear demonstration of the EXTEND_PAD mode, so revamp
it to show the filter extending a 4 pixel surface to cover the entire
output. However, this hides a discrepancy with the vector surfaces that we
cannot prevent the external renders from applying an interpolation to the
border pixels, so we copy the original test to extend-pad-border to check
the desired behaviour on boundary pixels.
2008-11-03 14:24:59 +00:00
Chris Wilson
b3462c5616 [test] Convert a few residual '-out.*'
Catch a few -out.* hiding in boilerplate.
2008-11-03 14:24:39 +00:00
Chris Wilson
8fc3d0ffeb [mime-data] Allow embedding of arbitrary mime-types.
Use the surface user-data array allow to store an arbitrary set of
alternate image representations keyed by an interned string (which
ensures that it has a unique key in the user-visible namespace).

Update the API to mirror that of cairo_surface_set_user_data() [i.e.
return a status indicator] and switch internal users of the mime-data to
the public functions.
2008-11-03 11:24:12 +00:00
Adrian Johnson
1685bbee1b test/README: fix typo 2008-11-02 20:12:30 +10:30
Adrian Johnson
ed2081d974 Specify a background color for XFAIL text
To improve readability on terminals with a white background.
2008-11-02 15:05:07 +10:30
Chris Wilson
ab8a0bfd82 Add a COPYING file to each aux. source directory
Include a COPYING inside perf/, test/, util/ to clarify the licensing
conditions beneath the respective directories. This is because cairo
itself (libcairo.so) is LGPL-2.1/MPL-1.1 but that only relates to src/.
The auxiliary source files are under a mix of free licenses and we wish to
be clear just what license applies to each file.

In particular, cairo-trace needs to include the GPL terms and conditions.
2008-10-31 16:14:14 +00:00
Chris Wilson
992f74d884 [test] Use '.' as the field separator in the names
We frequently use '-' within the test name or format name and so we
encounter confusion as '-' is also used as the field separator. At times
this has caused a new test to break an old test because the new test would
match one of the old test's target specific reference images. So switch
everything over to use '.' between fields (test name, target, format,
subtest, etc.).
2008-10-31 13:50:55 +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
Adrian Johnson
05fce5bced PS/PDF: Set image Interpolation flag
If the filter mode is anything other than DEFAILT, FAST or NEAREST set the
Interpolate flag in the image dictionary so that a smoothing filter is
applied when rasterising the vector file.

As we have no control over the implementation of the Interpolate filter
(the PS/PDF specifications leave it undefined) we need to capture the
output of poppler/GS and update our reference images. (For a couple of
tests, the filtering is irrelevant so for those we set the filter to
NEAREST.)

Note that GhostScript's Interpolate filter does not work on rotated images
(and a variety of other transformations) so several of the PS reference
images have use nearest-neighbour sampling instead of a bilinear filter.
2008-10-30 21:24:54 +00:00
Chris Wilson
ef98eb26f7 [test] Reenable device offset testing.
Restore device offset testing that was temporarily disable in the run up
to the 1.8 release.
2008-10-30 19:23:17 +00:00
Chris Wilson
4f2f46ef1b Restore the ability to choose the internal font.
Behdad wants to include the feature with 1.10, so we enable it as early as
possible in 1.9 dev cycle to generate as much feedback as possible.

The first change is to use "<cairo>" as being a name unlikely to clash
with any real font names.

This reverts commits:
  a824d284be,
  2922336855,
  e0046aaf41,
  f534bd549e.
2008-10-30 19:14:45 +00:00
Chris Wilson
cc109df2a7 [test] Update .gitignore
Add a couple of new programs to gitignore.
2008-10-30 17:52:15 +00:00
Chris Wilson
ab15d76275 [test] Remove XFAIL from user-font-mask
user-font-mask should PASS modulo the scaling anomalies in the external
renderers, so remove it from the XFAIL list.
2008-10-30 16:54:23 +00:00
Chris Wilson
540f555840 [analysis] Only limit to mask extends if bounded by mask.
The extents of cairo_mask() is only limited to the mask if the operation
is bounded by the mask.
2008-10-30 16:19:54 +00:00
Behdad Esfahbod
e51648b601 [test/xlib-expose-event] Save the output image to disk 2008-10-30 04:43:45 -04:00
Carl Worth
f534bd549e Remove test/twin-ref.png.
I missed this in a previous commit, (I think I had used a
pattern of twin-*-ref.png which of course didn't match
this file).
2008-10-29 21:30:00 -07:00
Carl Worth
2922336855 Remove twin test case.
This test relied on the recently-removed ability to select
the internal twin-based font family with a name of "cairo".

Presumably, we'll want to bring this test case back when
some other means of requesting that font face is added.
2008-10-29 16:25:00 -07:00
Carl Worth
81439b3bc8 Add missing files to CLEANFILES and DISTCLEANFILES.
Without these files in these lists, "make distcheck" is unhappy.
2008-10-29 16:19:30 -07:00
Carl Worth
dd0416f5d4 Add recently added reference images to REFERENCE_IMAGES list.
This is just part of the make-distcheck routine for me. I know
Behdad added a test to check for missing images in the list, but
it doesn't seem to be getting run automatically as part of
'make test' nor 'make distcheck', (or if it it, then I'm not
noticing its output).
2008-10-29 16:19:29 -07:00
Chris Wilson
9cd9644c1d [test] Add a pass-through test.
Check that colour values are correctly passed through all the backends.
Simple test of the most fundamental functionality.
2008-10-29 22:04:34 +00:00
Carl Worth
0ca6ba18e3 Add note to test/README on running with Xvfb.
This X server has been tested to run through the test suite with
no unexpected failures, and it avoids hitting any X-driver-specific
bugs.
2008-10-28 17:15:42 -07:00
Carl Worth
a94928ddfa Add svg-specific reference images for the twin test.
A bit annoying that I have to add the same image as both -svg11
and -svg12 but that's all the support we have in the current
test suite. I suppose I could avoid doing that by figuring out
why this test case cannot successfully roundtrip through librsvg
and back through cairo.
2008-10-28 15:55:38 -07:00
Carl Worth
53554ea889 Add ps2-specific reference images for trap-clip test.
These are quite similar to the existing ps3-specific reference images.
I definitely don't see any reason why this output should be considered
a failure.
2008-10-28 15:50:44 -07:00
Carl Worth
10fd16a05d Mark user-font-mask as XFAIL.
This test is expected to fail due to a couple of known bugs. Chris
has fixes for both bugs, but is holding off on them until after 1.8.2
to prevent introducing any possible new bugs with his fixes.
2008-10-28 15:41:40 -07:00
Carl Worth
655546243f Rename user-font-image test to user-font-mask.
Otherwise the reference image (user-font-image-ref.png) gets
interpreted as an image-specific reference image for the
user-font test case resulting in a bogus failure.
2008-10-28 15:35:35 -07:00
Adrian Johnson
a1a7ec6a05 Change ps to ps3 in test/README
The ps target no longer exists.
2008-10-27 23:13:05 +10:30
Adrian Johnson
670d942fe3 Change user-font-image test to use a pattern
This can be used to expose a bug in _cairo_rectangle_intersect() by
changing:

  fixed_scale = 1024 to 1 in cairo-user-font.c

and

cairo_matrix_translate (&matrix, 0, -8) to (&matrix, 0, -9) in
user-font-image.c

This will cause cairo_text_extents (cr, text, &extents) in
user-font-image.c to return a height of 8388683.
2008-10-27 23:04:16 +10:30
Adrian Johnson
cdacf55e1b Add user-font-image test
Draws bitmap glyphs using cairo_mask(). This test exposes a bug in the
calculation of the glyph extents.
2008-10-27 22:07:04 +10:30
Chris Wilson
88935947d1 [test] Add leaky-dashed-stroke
A test case for a leak whilst closing a dashed stroke extracted from the
report by Jeff Muizelaar who found the artifact whilst looking at
  firefox http://people.mozilla.com/~jmuizelaar/BerlinDistricts-check.svg
2008-10-26 05:30:56 +00:00
Behdad Esfahbod
d692284ab8 [test/user-font] Exercise glyph 0
Previously there was a bug in cairo and/or poppler causing glyph 0 of
user fonts to not show up.  This is fixed now, so we exercise glyph 0.
2008-10-23 01:45:35 -04:00
Chris Wilson
b2cbbceb4c [test/meta-surface-pattern] Propagate errors.
Use cairo_get_target() to propagate any errors from the secondary context.
2008-10-21 20:01:23 +01:00
Chris Wilson
5a822046cc [test/xlib-expose-event] Propagate errors.
Use cairo_get_target() to propagate errors from secondary contexts.
2008-10-21 11:31:12 +01:00
Chris Wilson
21223cc12c [test/unbounded-operator] Propagate errors.
Use cairo_get_target() to propagate errors from secondary contexts.
2008-10-21 11:31:11 +01:00
Chris Wilson
4c8de6d99d [test/surface-pattern-scale-up] Propagate errors.
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-21 11:31:11 +01:00
Chris Wilson
e8de7d1c36 [test/surface-pattern-scale-down] Propagate errors.
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-21 11:31:11 +01:00
Chris Wilson
b5551cfce2 [test/rotate-image-surface-paint] Proapgate errors.
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-21 11:31:11 +01:00
Chris Wilson
6d41ffbbed [test/pixman-rotate] Propagate errors
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-21 11:31:10 +01:00
Chris Wilson
64949b8173 [test/operator-source] Propagate errors.
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-21 11:31:06 +01:00
Chris Wilson
971f030b7d [test/operator-clear] Propagate errors.
Use cairo_get_target() to propagate errors from secondary contexts.
2008-10-21 11:31:06 +01:00
Chris Wilson
9b919b0e91 [test/extend-pad] Propagate errors.
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-21 11:31:06 +01:00
Chris Wilson
69415b4fc6 [test/device-offset-scale] Propagate errors
Use cairo_get_target() to propagate errors from the secondary contexts.
2008-10-21 11:31:06 +01:00
Chris Wilson
9ab296123e [test/device-offset-positive] Propagate errors.
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-21 11:14:01 +01:00
Chris Wilson
594fa0836f [test/device-offset] Propagate error.
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-21 11:12:11 +01:00
Chris Wilson
86356a9578 [test] Add degenerate-dash to XFAIL.
PS (ghostscript) interprets the degenerate end-caps quite differently, and
perhaps slightly more rationally... Add this to XFAIL, until we have a
definitive specification on how we should behave.
2008-10-20 23:04:03 +01:00
Chris Wilson
9529699028 [test/user-font-rescale] Check and propagate errors.
We need to check the error status on set_user_data() to be sure that the
data has been set and error otherwise.
2008-10-19 09:36:49 +01:00
Chris Wilson
683de2fea2 [test/user-font[-proxy]] Check for error from set_user_data().
Check in case we fail to attach our user_data.
2008-10-18 09:55:15 +01:00