Commit graph

1900 commits

Author SHA1 Message Date
Behdad Esfahbod
ba62d2d30a Update .gitignore files 2008-06-26 16:20:58 -04:00
Chris Wilson
47d8739ea1 [test/xlib-surface-source] Build under --disable-xlib-xrender.
Add an ifdef to support compiling without XRender.
2008-06-19 12:25:01 +01:00
Chris Wilson
38c4bcc2da [test/solid-pattern-cache-stress] Do what it says on the tin.
Actually draw to the surface after setting the source in order to
trigger use of the solid surface cache.
2008-06-19 12:24:30 +01:00
Søren Sandmann
cba1543c92 Remove large-clip from xfail list 2008-06-10 18:09:00 -04:00
Søren Sandmann
bd0cf05623 Add the correct reference image for the large-clip test 2008-06-10 18:09:00 -04:00
Søren Sandmann
60971fb514 New large-clip test
This tests clipping to a rectangle that doesn't fit in 16 bits.
2008-06-10 18:08:59 -04:00
Adrian Johnson
c8fc587ede Update user-font test PS/PDF ref images
The PDF output no longer requires a PDF specific reference image. The
lastest poppler from git is required to get the fix for a bug in Type
3 font rendering.
2008-06-09 23:14:47 +09:30
Adrian Johnson
4c5370dad8 Update PDF/PS ref images of text-rotate and ft-show-glyphs-positioning 2008-06-04 23:27:05 +09:30
Behdad Esfahbod
51885e9a1e [test/user-font.c] Fix compiler warnings 2008-05-28 16:52:19 -04:00
Behdad Esfahbod
0f07c45fa3 [test/user-font] Use user_data to access glyphs array
This way the same callback code can be used to render multiple different
glyph arrays.  Change done for education purposes, otherwise doesn't
make any difference in the test.
2008-05-27 17:53:35 -04:00
Behdad Esfahbod
a715671c6f [test/user-font-proxy] New test using fonts inside a user-font
PDF fails and needs some fixes in the PDF surface instead of a new
ref image IMO.
2008-05-24 20:34:41 -04:00
Behdad Esfahbod
4957a78947 [test/surface-finish-twice.c] Adapt to recent change that multiple finish is ok 2008-05-24 15:16:44 -04:00
Behdad Esfahbod
d947ee0ef6 [test/large-font] Make the font REALLY LARGE
10000 that is.  xlib fails now again.  Not because of glyph size issues.
Because we skip rendering any glyphs with positions not in range -1024..15359.
Working on a fix.
2008-05-23 20:41:26 -04:00
Carl Worth
b957beb0df Add large-font test to exercise a cairo-xlib bug.
The original bug report is here:

	corrupt glyph positions with large font
	https://bugzilla.redhat.com/show_bug.cgi?id=448104
2008-05-23 08:05:18 -07:00
Carl Worth
8efb103600 Extend fallback-resolution test to expose bug with groups
Groups appear to always be rendered with a fallback resolution of
72.0 ppi rather than the desired fallback resolution.
2008-05-21 10:23:37 -07:00
Behdad Esfahbod
168447cc2b [user-font] Use opaque colors such that PS backend gets tested
Also update ref images.  All backends pass now.
2008-05-15 20:09:17 -04:00
Behdad Esfahbod
142ba30604 [test/Makefile.am] Add 'make run' target
It runs tests under a tool specified tool.  For example:

	make run TOOL=gdb TESTS=user-font TARGETS=pdf
2008-05-15 19:27:17 -04:00
Behdad Esfahbod
62652ecab7 [test/user-font] Another minor tweak to the font 2008-05-15 13:28:03 -04:00
Behdad Esfahbod
f68fb2c747 [test/user-font] Add some more glyphs
The glyph for 'z' now reveals a bug in PDF type1 code.
2008-05-13 14:07:42 -04:00
Behdad Esfahbod
17f21ea307 [cairo-user-font] Implement user fonts 2008-05-10 01:21:45 +02:00
Behdad Esfahbod
1246ff8aec [cairo-test] Implement cairo_test_log_path() to dump a cairo_path_t to logs
Dumping paths is so hard in C.  Shouldn't be.  At least not when debugging...
2008-05-09 23:21:14 +02:00
Chris Wilson
ff596c64fb [test] Add degenerate-arc
This test case is to exercise the divide-by-zero error reported by
Luiz Americo Pereira Camara <luizmed@oi.com.br>,
http://lists.cairographics.org/archives/cairo/2008-May/014054.html.
2008-05-06 14:31:02 +01:00
Chris Wilson
fed9d9060e [test/invalid-matrix] Disable floating point exception.
test/invalid-matrix purposely feeds invalid numbers into cairo, in
order to check its detection of garbage values. In doing so, cairo
raises an Invalid exception, but as this is a direct result of an abuse
of the API we can treat it as expected behaviour and ignore the
exception.
2008-05-06 14:30:49 +01:00
Chris Wilson
1755a2d27d [test] Enable floating point exceptions.
Some platforms and applications enable floating point exceptions, so it
seems sensible to run the test-suite with the most serious exceptions
enabled - divide by zero, invalid result and overflow.
2008-05-06 14:30:35 +01:00
Chris Wilson
8742429c79 [test] Add test case for a leaky dashed rectangle.
Franz Schmid reported on the mailing list,
http://lists.cairographics.org/archives/cairo/2008-April/013912.html,
an issue with drawing a dashed rubber band in Scribus. The problem
appears when segments of the dashed rectangle are outside the image,
with the errant dash connecting the ends of the visible segments.
2008-04-29 15:19:40 +01:00
Chris Wilson
5d20479b99 [test/ft-font-create-for-ft-face] Fix the lifetime issues of FT_Face.
The font_face created from cairo_ft_font_face_create_for_ft_face()
was being kept alive by a reference from the context beyond the
lifetime of the parent cairo_scaled_font_t (which owned the FT_Face).
Correct the example in the test code to remove this errant reference
before cleaning up the fonts. (To be fair, to actually trigger a bug
one has to evict the FT_Face from the cache before using the font_face
- merely creating a cairo_scaled_font_t for every font on the system is
enough.)
2008-04-29 09:28:10 +01:00
Chris Wilson
b4b77cedc9 [test/Makefile.am] EXTRA_DIST += create-from-png*-ref.png
Add the new reference images for create-from-png to the distributable.
2008-04-21 22:51:24 +01:00
Chris Wilson
a313547f6d [test/create-from-png] Check loading of various colour types.
Check that when loading from index/gray/rgb PNGs, with and without
alpha/transparency, that the correct surface is generated by read_png(),
i.e. if the PNG contains an alpha channel then the image must be an
ARGB32 surface.
2008-04-21 19:44:11 +01:00
Chris Wilson
0e315b1e60 [test/a8-mask] Perform the stride API checking once.
The stride API is independent of the surface and does not need to be
repeated for every surface.
2008-04-15 13:29:10 +01:00
Chris Wilson
8b36ca0858 [test/a1-mask] Perform the stride API checking once.
The stride API is independent of the surface and does not need to be
repeated for every surface.
2008-04-15 13:29:02 +01:00
Chris Wilson
fa5e87ad23 [cairo-test] Spelling fixes in comments.
Skim through the comments fixing trivial smelling pistakes.
2008-04-15 13:28:57 +01:00
Chris Wilson
28a1dabed8 [test] Add a regression test for bug 10921
This bug first was fixed in 40558cb15e,
but then reintroduced in 9cfd82e87b, which
became part of the 1.6.2 quick release.

As penance to make sure I never repeat this same bug again, I offer this
test case which exercises the XSetClipMask(NULL) path and hopefully
simulates some 'typical' usage of cairo by GUI toolkits.
2008-04-11 23:57:01 +01:00
Chris Wilson
f57100acd4 [test] Handle TEST_CONTENT_COLOR_ALPHA_FLATTENED similar surfaces.
Convert the boilerplate specific flattened content value to the ordinary
CAIRO_CONTENT_COLOR_ALPHA for use with cairo_push_group_with_content() -
otherwise cairo rightfully flags an error and the test harness decides
that the similar surface is not available.
2008-04-11 15:39:11 +01:00
Adrian Johnson
9166686abd Refresh text-rotate PS reference image 2008-04-11 22:50:52 +09:30
Chris Wilson
089bf98df1 [test] Add group-paint
The experience of running the entire test suite under cairo_push_group()
did at least reveal that there was a potential bug in the pdf backend.
This test is just the simplest of drawing operations - simply filling
the similar surface with solid blue, and then blitting that surface to
the destination.
2008-04-08 20:17:42 +01:00
Chris Wilson
935b0bbf6e [test/filter-bilinear-extents] Memleak.
Destroy the temporary image surface.
2008-04-08 11:28:18 +01:00
Carl Worth
f7dea9a8d3 Fix distcheck by renaming large-source-ref.c to large-source-ref.png (oops!) 2008-04-08 02:29:05 -07:00
Carl Worth
c19133eb9a Revert "[test] Repeat tests using cairo_push_group()."
This reverts commit 07122e64fa.

The extra testing did find a pdf bug, and that should be fixed,
but the extra maintenance burden of running another iteration
of all tests does not seem justfied at all---particularly since
it looks like dozens of new reference images would be needed
for the svg backend.

Also, the new "failures" of the image backend with this new
testing look like a misunderstanding of exactly what the new
testing is actually drawing.
2008-04-08 01:34:37 -07:00
Chris Wilson
33c54ed240 [test] Add large-source to exercise handling of massive images.
This test exercises https://bugzilla.mozilla.org/show_bug.cgi?id=424333.

The test is expected to fail due to issues with pixman, but cairo
should fail gracefully and neither crash nor cause XErrors.
2008-04-08 07:52:47 +01:00
Chris Wilson
9aac5916bc [test/xlib-surface] Check for mismatching Visuals and XRenderPictFormats
Vladimir Vukicevic reported that surfaces were being created with
mismatching Visuals and XRenderPictFormats - and demonstated here.
2008-04-08 07:52:47 +01:00
Chris Wilson
07122e64fa [test] Repeat tests using cairo_push_group().
Test surfaces using similar surfaces with both CONTENT_COLOR and
CONTENT_COLOR_ALPHA, if applicable. This seems justified by the apparent
bugs in the pdf backend when going from an ARGB32 similar surface to
a destination RGB24 surface as well as isolated bugs in the image
backend.

The original goal was to try and trick the test suite into producing
a xlib surface with mismatching Visual/XRenderPictFormat. This succeeds,
although with a little bit of brute force in the xlib backend, but the
search to reproduce a BadMatch error fruitless.
2008-04-08 07:52:46 +01:00
Chris Wilson
e04e426238 [test/get-xrender-format] Free static data on exit.
Free the internal caches so that valgrind reports zero leaks.
2008-04-08 07:52:46 +01:00
Chris Wilson
e57ef66fab [test/xlib-surface] Zero pixel buffers before use.
As we only use RGB24 surface data the alpha channel is undefined, so
zero it to prevent valgrind warnings.
2008-04-08 07:52:46 +01:00
Chris Wilson
d0672e85ef [test/surface-source] Skip tests if we cannot create the source surface.
Check that the test environment supports the desired source and avoid
triggering asserts in the test routines.
2008-04-08 07:52:46 +01:00
Chris Wilson
056d3c853e [test/stroke-image] Fix memleak.
Release the temporary image surface after setting it as the source.
2008-04-08 07:52:46 +01:00
Carl Worth
e460e586d7 Update several pdf-specific reference images
I don't know if we made minor changes to the pdf backend, or
if this was due to a poppler change, (we recently bumped the
poppler required for testing up to 0.8.0), but any way around
it these test results look just as good as the reference images
they are replacing.
2008-04-07 22:02:44 -07:00
Carl Worth
fdcd144584 Add filter-bilinear-extents to the XFAIL list
This test case does show a bug, and we have lots of ideas on how
to fix the bug, but we want to wait until after the 1.6 release
before we fix it. See:

	http://bugs.freedesktop.org/show_bug.cgi?id=15349
2008-04-07 16:09:08 -07:00
Carl Worth
c88adb6aee Add svg-specific reference images for smask and smask-mask
The most recent change for the mask_id allocation fixes these
two test, (it fixes mask-image-mask as well, but it didn't need
a new reference image).
2008-04-07 16:09:03 -07:00
Carl Worth
8aa306ec08 Add svg-specific reference images for smask-fill, smask-paint, and smask-text tests 2008-04-07 15:56:26 -07:00
Carl Worth
3d86023281 Add ps-specific reference images for smask and smask-text tests 2008-04-07 15:56:26 -07:00