Commit graph

2310 commits

Author SHA1 Message Date
Chris Wilson
b30de64a8c [test] Add regression test for 005436
Jeff Muizelaar found a regression in commit 005436 and submitted this
little test to exercise it. The essence of the bug appears to be wrt to
the product of the CTM and device transform matrices.
2009-03-01 10:10:13 +00:00
Jeff Muizelaar
d4227fc912 [test] Fix assert on default font family in toy-font-face
toy-font-face was checking that cairo_toy_font_face_get_family returned ""
which is CAIRO_FONT_FAMILY_DEFAULT when the freetype font backend is the
default. However, when other font backends are the default the returned family
is different. Therefore, instead of checking for "", we check for the appropriate
string depending on the backend.
2009-02-19 11:45:33 -05:00
Jeff Muizelaar
f7b3c9df58 Add test/Makefile.sources
This lets test/Makefile.am and test/Makefile.win32 share a common list of sources.
It also makes test/Makefile.win32 useful again.
2009-02-16 22:28:32 -05:00
M Joonas Pihlaja
e380beae53 [sdl] Remove new backend.
The SDL backend makes invalid assumptions about SDL_Surface locking
semantics and doesn't deal correctly with the unpremultiplied pixel
format supported by SDL.  Removed as per discussion on the mailing list.

http://lists.cairographics.org/archives/cairo/2009-February/016595.html
2009-02-16 14:01:43 +02:00
Chris Wilson
187e347351 [test] Free ref_name in fallback-resolution.
Trivial leak of a few thousand bytes.
2009-02-13 13:26:52 +00:00
Søren Sandmann
b3e2433f1e Correct the reference image for the rotate-image-surface-paint test 2009-02-11 17:55:15 -05:00
Jeff Muizelaar
41cbd935f9 [test] Add cairo_test_NaN and use it in place of strtod
strtod("NaN") returns 0.0 with the MSVC runtime so we
need to generate NaN some other way.
2009-02-11 15:24:24 -05:00
Jeff Muizelaar
70297f257d [test] Add crtdbg.h include
crtdbg.h is required for _CrtSetReportMode() and _CrtSetReportFile().
2009-02-10 17:58:28 -05:00
Jeff Muizelaar
41e46c7754 [test] Don't embed preprocessor directives inside macros
MSVC can't handle this. GCC will warn with -pedantic, but I'm not
sure we want to enable that.
2009-02-10 11:44:20 -05:00
Jeff Muizelaar
fe40d3bdb0 [test] Allocate glyph array with malloc
Keeping it on the stack causes a stack overflow of Window's
default 1mb stack.
2009-02-09 23:43:04 -05:00
Jeff Muizelaar
50f8c2e4f3 [test] define isnan() on MSVC
Needed for user-font-rescale.c
2009-02-09 23:39:38 -05:00
Jeff Muizelaar
a6c8f18a39 [test] Avoid C99 designated initializers
MSVC doesn't support these so we shouldn't use them.
2009-02-09 15:59:01 -05:00
Jeff Muizelaar
3d2fcec948 [test] Define INFINITY on MSVC
1./0. produces a compiler error on MSVC so we'll use HUGEVAL instead.
2009-02-09 15:12:41 -05:00
Behdad Esfahbod
a55655a82d [test] Fix "make dist" 2009-02-06 12:47:51 -05:00
Jeff Muizelaar
af5ca7249f [test] Fix the definition of INFINITY
In my defence, even with INFINITY as 0, I was seeing new asserts on win32.
Caught by Jeremy Lea.
2009-02-05 16:46:50 -05:00
Jeff Muizelaar
2676b3bdd6 [test] Define INFINITY if it hasn't been defined.
This lets us use more of invalid-matrix on win32
2009-02-03 14:18:44 -05:00
Chris Wilson
322fb00066 [test] Compile again without memfault.
Hide the valgrind macro when not using memfault.
2009-01-29 22:15:21 +00:00
Chris Wilson
dd4276c661 [stroker] Rectilinear dashing.
Extend the rectilinear stroker to handle dashes, so that for pixel-aligned
dashed strokes we completely avoid tessellation overhead.
2009-01-29 14:55:21 +00:00
Chris Wilson
8388af1378 [test] Trivial fixes for error paths.
Kill a few leaks along error paths in the test code.
2009-01-29 10:10:41 +00:00
Chris Wilson
3752f690b4 [test] Suppress suppressed memfault report
Check to see if there are any *unsuppressed* memfaults before declaring
unreported faults.
2009-01-29 10:10:40 +00:00
Carl Worth
c4e54629bb Add details to test/COPYING about license of bundled fonts.
Just the public-doamin 6x13.pcf file for now, but Adrian will
be bundling more soon.
2009-01-22 12:26:55 +11:00
Chris Wilson
49eca78a42 [test] Add a huge-radial test case.
Also test the handling of radial gradients with large radii.
2009-01-14 16:51:08 +00:00
Chris Wilson
7709d1d9d4 [test] Add fill-image.
A filled equivalent of stroke-image, that checks that the pattern
matrices are applied correctly during fills - useful with the
segregation between fills and strokes introduced by spans.
2009-01-14 16:51:08 +00:00
Chris Wilson
5605e4bfcd [test] Propagate failure from painting large-source-roi
Use cairo_get_target() to propagate any failure when creating the
large-source.
2009-01-14 16:51:08 +00:00
M Joonas Pihlaja
8157bc8a2d [test] Stress test using large source images.
This test attempts to trigger failures in those backend clone_similar
methods that have size restrictions on the resulting image.  It also
triggers errors in scaling down large image surfaces as the image
backend also fails this test.
2009-01-04 04:14:28 +02:00
Chris Wilson
388ae177e4 [boilerplate] Remove CAIRO_BOILERPLATE_LOG()
The variadic macro is only used within boilerplate/ so replace it with a
simple, and portable, call to fprintf.
2009-01-03 22:56:17 +00:00
Chris Wilson
163c326c82 [test] Free test name
Adding the missing free for the converted test name.
2009-01-02 15:44:51 +00:00
Chris Wilson
dd65be740c [test/pdf-mime-data] Free data on error paths.
Cleanup the allocated buffers on error.
2009-01-02 15:44:51 +00:00
Chris Wilson
19e8c5c7f4 [test] Fix mismatched free.
A couple of strings allocated using glib functions but freed with system
malloc.

Reported: http://bugs.freedesktop.org/show_bug.cgi?id=19210.
2009-01-02 09:53:21 +00:00
Chris Wilson
7df082dd8a [test] Update twin reference images
Subsequent to recent tweaks, update the reference images for twin.
2008-12-29 16:08:12 +00:00
Chris Wilson
84b81388be [test] Draw spline bbox
Add the stroked extents to the spline-decomposition test.
2008-12-29 12:55:05 +00:00
Jeff Muizelaar
a303bbaea3 [font-face-get-type] Fix test to cleanup the surface and context properly
Destroy the context and the surface even when the test fails.

I ran into this because cairo_debug_reset_static_data() is called between the
tests on the quartz backend (it doesn't fork) and isn't on other backends? This
is perhaps a mistake...
2008-12-23 16:12:56 -05:00
Chris Wilson
93672d842f [test] Fix reference handling in user-font-rescale
user-font-rescale stored the current font on the context in order to
create a rescaling proxy font. As we failed to take a reference to the
font, it caught us by surprise when the font disappeared as we modified
the context before creating our proxy. Ho hum.
2008-12-23 15:03:08 +00:00
M Joonas Pihlaja
38ec6e302c [test] Fix any2ppm build when building without the full complement of surfaces.
It was complaining about g_init_type () being used without the proper includes
which would have been pulled in by the svg or poppler includes.
2008-12-23 02:05:32 +02:00
Jeff Muizelaar
f8886ad1b3 [scaled-font-zero-matrix] Destrory scaled font and font options
Oops.
2008-12-18 20:50:20 -05:00
Jeff Muizelaar
4567692326 Add test creating a scaled font with a zero ctm matrix 2008-12-18 18:03:40 -05:00
Jeff Muizelaar
18054ef00c [test] Quartz doesn't like being forked
When the cairo-test-suite forks CoreFoundation complains with:
"The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
When forked so avoid doing it in the test suite for now. In the future we should investigate
the possibility of a work around.
2008-12-18 18:01:52 -05:00
Chris Wilson
3a53e0261b [test] Update twin reference images.
Closing the 'o' in twin has removed a slight artefact - update the reference
images to match.
2008-12-18 12:06:46 +00:00
Chris Wilson
c2478de26c [twin] Switch internal users to the new name.
s/<cairo>/@cairo:/
2008-12-18 12:06:46 +00:00
Chris Wilson
43edb4dd7b Fix compilation with gcov
We need to add --coverage to LDFLAGS, so create CAIRO_LDFLAGS and use that
to populate AM_LDFLAGS.
2008-12-14 16:44:03 +00:00
Chris Wilson
bcea3151d6 [test] Add missing joins.ref.png
Missed this file when adding the reference images for joins.
2008-12-14 16:44:03 +00:00
Chris Wilson
792057539b [test] Only delete output images beneath output.
We were using an overly-liberal find that also deleted copied output for
use in CAIRO_REF_DIR if that directory was below test/. So only delete
files below output/ (which should only be used by cairo-test).
2008-12-12 13:43:36 +00:00
Chris Wilson
913cbad25e [test] Add a simple joins test case
Exercise joins between short (<LINE_WIDTH) lines - used in debugging
stroke-to-path.
2008-12-12 13:43:30 +00:00
Chris Wilson
4ff884fe4d [test] Check idempotency of append_path() -> copy_path()
The API should preserve the precision across the public interface so that
the user is able to retrieve the co-ordinates that he used to construct
the path. However since we transform the path to a 24.8 fixed-point
internal represent we currently incur a precision-loss - the affects of
which can be seen in the miter-precision test case for example. It is
planned to move to keeping the path as doubles until the backend
explicitly requests the fixed-point coodinates (and some backends, e.g.
pdf, might only ever use the doubles). Then, barring rounding errors
during path transformations, we should be able to return the exact path
the user set (under an identity CTM, of course ;-).
2008-12-12 13:23:09 +00:00
Chris Wilson
fe4af195a7 [test] Add a rectilinear-dash test case.
Exercise dashing on pixel-aligned boundaries to test extending the
rectilinear stroker to handle dashes.
2008-12-12 13:23:08 +00:00
Chris Wilson
888f62feaa [test] Propagate error from path
If the path is in error, just append it to the context so that the error
is propagated correctly.
2008-12-12 11:11:49 +00:00
Chris Wilson
f13f63e3d8 [test/clip-nesting] Propagate status from sub-context.
Use cairo_path_append() to propagate an error status from a child context
to it parent so that it is properly reported under memfault.
2008-12-12 11:11:49 +00:00
Chris Wilson
e6e33b036f [test/solid-pattern-cache-stress] Propagate status from sub-contexts.
Use a cairo_append_path() to set an arbitrary error status on the parent
context, in order to propagate errors from a child.
2008-12-12 11:11:49 +00:00
Chris Wilson
dfc49a67e6 [test] Trim the number of fallback resolutions tested.
Simplify the test matrix to only include testing the fallback-resolution
of a uniform scale in one or both axes.
2008-12-12 11:11:48 +00:00
Chris Wilson
0ebbcd671c [test] Fix memleak from fallback-resolution.
The test-name was being recreated for every pass, but was never freed.
2008-12-12 11:11:48 +00:00