Commit graph

1319 commits

Author SHA1 Message Date
Chris Wilson
ac30ced613 [test] Check for surface create failure.
If the image surface creation fails, the data pointer will be NULL leading
to a segfault -- so check!
2009-03-24 07:50:58 +00:00
Chris Wilson
b5a4a2c4b1 [test] Early test for memfault.
Check the error status within after each iteration in
solid-pattern-cache-stress.
2009-03-24 07:50:58 +00:00
Chris Wilson
1a7b94f934 [test] Check for errors during get-path-extents.
Need to check that an error was not raised on the context before checking
whether the extents match expectations.
2009-03-24 07:50:58 +00:00
Chris Wilson
c932a809d6 [test] Propagate allocation failure.
Check for memfaults during rel-path test.
2009-03-18 09:44:33 +00:00
Chris Wilson
7db55b37d4 [test] Destroy pattern on error paths.
Destroy the pattern after encountering an error in pattern-getters test.
2009-03-18 09:44:33 +00:00
Chris Wilson
dc176d88ac [test] Trivial leak on error in show-glyphs-many.
Free the allocated glyph array after failure.
2009-03-18 09:44:33 +00:00
Chris Wilson
a8158d443e [truetype] Move the sizeof asserts to compile time.
Eliminate the need for a runtime test on the sizeof the private structures
by performing the check at compile time. This was provoked by Ginn Chenn
noting that the test was including a private header.
2009-03-03 11:21:35 +00:00
Chris Wilson
f178f55e47 [test/any2ppm] Update the cairo-script-interpreter callback.
Reflect the current prototype which now specifies the content to use when
creating the surface.
2009-03-03 10:25:05 +00:00
Chris Wilson
694f2eea9f [test/any2ppm] Add feature checks for daemon()
Add the feature checks for the presence of the daemon() function call.
2009-03-03 10:24:25 +00:00
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