Commit graph

517 commits

Author SHA1 Message Date
Carl Worth
76cc6af100 Make xlib and xcb backends tolerant of single-bit errors in the test suite output.
Manually "cherry picked" from 61bf9b009b
(the cherry-pick command cannot handle the file renames and
indentation changes involved here).
2006-11-02 15:12:16 -08:00
Carl Worth
ad4f0ba2d5 Move target tolerance to cairo_test_target structure (should let single-pixel SVG errors pass)
Previously we were setting the target tolerance based on the surface
type. But that doesn't work as multiple backends will provide a surface
of type meta. So instead we put the tolerance as a value in the
cairo_test_target data structure.

With this change, some single-pixel errors of 1 in the SVG backend
should now be ignored.

Manually "cherry picked" from bcb7863f00
(the regular cherry-pick command cannot handle the file renames and
 indentation changes involved here).
2006-11-02 15:12:15 -08:00
Carl Worth
02497b39c8 test: Ignore single-bit errors for SVG backend.
The interface of the various buffer/image_diff functions is improved to
provide the maximum pixel difference in addition to the number of pixels
that differ. This value can then be used to compare against a per-backend
tolerance.

Currently I've set the SVG backend's tolerance to 1 to handle some issues
we're currently seeing of single-bit differences on different systems, (but
we're not exactly sure why yet).

Also I improved the image_diff routines to properly report a status value
on failure rather than the bogus value of -1 for pixels_changed.

Cherry-picked from d1834cca19
(and fixed ever so slightly to actually compile).
2006-11-02 15:12:15 -08:00
Carl Worth
11127fc210 test: Remove custom read/write-png code in favor of using cairo surfaces
Also combine image_diff and image_diff_flattened into a single function

This was manually taken from 9547521885
(It would have been a cherry-pick, but that doesn't yet handle file
renames.)
2006-11-02 15:12:15 -08:00
Carl Worth
cc8dd91ac2 test: Update reference images due to previous change to _cairo_color_compute_shorts
The previous change was in b62710d4f8
We just forgot to update the reference images at the time so there
have been false failure results in the test suite until now.
(cherry picked from 670b3ce243 commit)
2006-11-02 13:02:08 -08:00
Carl Worth
60d65de159 Add neglected reference images for infinite-join test
(cherry picked from 40e1c0246d commit)
2006-11-02 13:02:03 -08:00
Carl Worth
137ced1dd7 test/infinite-join: Modify to draw something visible, and make the output a more reasonable size.
The modification was performed with care to ensure that the bug
is still exercised. Also, reference images are added.
(cherry picked from 5b7a7f39ad commit)
2006-11-02 13:02:03 -08:00
Carl Worth
16a08ff1b0 Add test case from bug #8379 demonstrating infinite loop during round join
(cherry picked from 8744929030 commit)
2006-11-02 13:02:03 -08:00
Carl Worth
b586c0456e Rename test from stale path-data name to copy-path
(cherry picked from e4dc73ab1c commit)
2006-10-31 21:13:52 -05:00
Carl Worth
cfffc5022e Fix cairo_copy_path and cairo_copy_path_flat to propagate errors.
One of these functions was already documented to be doing this, and
the other one should have been. Now the documentation and behavior
for both are consistent, (and the path-data test case verifies this).
(cherry picked from 5f833c134b commit)
2006-10-31 21:13:37 -05:00
Carl Worth
48e0509f93 test/bitmap-font: Fix arguments to FcFreeTypeQuery to avoid warnings.
(cherry picked from 416e94532b commit)
2006-10-31 21:07:43 -05:00
Vladimir Vukicevic
baca4a50ac [win32] Misc win32 compilation fixes
Fix win32/MSVC defines for snprintf, inline, and M_PI
(cherry picked from 3c5a02c3ed commit)
2006-10-31 21:07:00 -05:00
Behdad Esfahbod
4d7b341a7e [test] Use FcFreeTypeQuery
(cherry picked from 7ad6e94101 commit)
2006-10-31 20:53:48 -05:00
Behdad Esfahbod
eb388ca4cb [test] Use $(srcdir) to find valgrind supressions
(cherry picked from 851dd63719 commit)
2006-10-31 20:53:16 -05:00
Carl Worth
c55f71bdab test: Add link to test log file in HTML output
(cherry picked from 5ef4c991f6 commit)
2006-10-31 20:51:31 -05:00
Behdad Esfahbod
a5f068e10d [test] Add 128 to any diff component such that differences are visible 2006-08-30 13:19:05 -04:00
Behdad Esfahbod
96c8f92883 [test] bufferdiff: take abs of the pixel diffs. Oops! 2006-08-22 22:00:58 -04:00
Carl Worth
790a359f89 EXTRA_DIST: Add missing source-clip-scale-svg-ref.png 2006-08-18 16:46:57 -07:00
Carl Worth
2860af3ce2 bitmap-font: Add missing pdf-specific reference image 2006-08-18 16:35:27 -07:00
Carl Worth
5f94275a4b Update .gitignore due to recent rename. 2006-08-18 16:09:53 -07:00
Carl Worth
3cf3d4343b Mark ft-text-vertical-layout tests as XFAIL since we'repunting these from the 1.2.4 release. 2006-08-18 14:23:31 -07:00
Carl Worth
84a9ca1835 Rename ft-text-vertical-layout-truetype to ft-text-vertical-layout-type3 2006-08-18 13:08:59 -07:00
Behdad Esfahbod
9c2d9d590b [test] text-rotate: Update ref images to make image pass again
after the font_options change we made in the test suite a while back.
2006-08-18 12:04:16 -04:00
Carl Worth
861f1cb4f7 Merge branch 'jrmuizel-stroking-fixes' into cairo
Conflicts:

	test/dash-caps-joins-ps-argb32-ref.png
	test/degenerate-path-ps-argb32-ref.png
	test/degenerate-path.c
2006-08-18 07:59:20 -07:00
Carl Worth
200a2d811e close-path: New test case to demonstrate corner case discovered by Tim Rowley
The bug shows up when doing cairo_copy_path_flat for a path that has
a curve_to immediately after a close_path. When the curve is flattened
the flattener is using (0,0) as the initial point rather than the proper
close_to point.

This test also serves to ensure a similar bug doesn't crop up when
closing a path that begins with an implicit move_to, (as from cairo_arc).
In that bug the path state may have no last-move-point and the path
is closed to (0,0). This bug is not present currently, but did appear
during the development of a fix for the bug above.
2006-08-18 06:32:11 -07:00
Behdad Esfahbod
6f8cf53b1e [test] Don't use signals if signal.h is not available 2006-08-17 22:03:36 -04:00
Carl Worth
e4e5002c48 bitmap-font: Add cairo_text_path;fill to demonstrate bug #7889 2006-08-17 17:50:41 -07:00
Carl Worth
e8e7ccf602 Add rotation to bitmap-font to demonstrate failure of bug #7888 2006-08-17 17:50:40 -07:00
Carl Worth
d7b52a8f44 Add long-lines to the XFAIL list, (we're not fixing it before 1.2.4) 2006-08-17 16:14:21 -07:00
Carl Worth
ccf60202d3 Add SVG-specific reference image for source-clip-scale test
The difference here is that the SVG backend uses a meta-surface for
its similar surface, so there are no rasterization/filtering
artefacts when scaling the source surface.
2006-08-17 13:35:16 -07:00
Carl Worth
64d2feb9f6 Harmonize implementations of source-clip and source-clip-scale to make similarities more evident. 2006-08-17 13:35:15 -07:00
Carl Worth
524507c39f Rename src-clip test to source-clip-scale 2006-08-17 13:35:15 -07:00
Vladimir Vukicevic
afb50580ce Add src-clip test case to demonstrate bug with clipping applying to a source surface. 2006-08-17 13:35:15 -07:00
Behdad Esfahbod
6122cc85c8 [test] Add $(LDADD) to svg2png_LDADD, to link to correct cairo
Previously it was using the cairo found in system.
2006-08-16 20:07:06 -04:00
Behdad Esfahbod
30cd66fe9a [test] Add ft-text-vertical-layout-truetype. 2006-08-16 19:43:55 -04:00
Behdad Esfahbod
158e160211 [.gitignore] Add truetype-tables 2006-08-16 19:43:41 -04:00
Behdad Esfahbod
cbcf1ddd64 [test] New torture tests ft-text-vertical-layout-truetype/type1
that combine vertical layout with font_matrix rotation and translation.
Currently Type3 and Type1 font paths both show broken behavior.
The type1 test uses "Nimbus Sans L" as the font.
2006-08-16 14:27:40 -04:00
Behdad Esfahbod
91eb56998c [test] ft-text-vertical-layout: Update ref images 2006-08-15 05:49:21 -04:00
Behdad Esfahbod
db779b5121 [test] ft-text-vertical-layout: Use the string "i-W" to better show vertical metrics 2006-08-15 05:27:59 -04:00
Emmanuel Pacaud
17ec33aa4f New test for long line bug.
This shows at least an issue in cairo_fixed_from_double where values
> 32767 are converted to -32768, instead of being clamped to 32767.
2006-08-14 20:19:15 +02:00
Pavel Roskin
a06af40c35 [test] Fix warnings in tests on 64-bit systems
Cast argiments from size_t to int.  size_t is 64-bit on 64-bit systems,
which causes a warning.  The actual data should fit 32 bit comfortably.
2006-08-13 04:47:11 -04:00
Pavel Roskin
58963a2bf9 [test] Allow overriding Valgrind flags on the command line
Don't hardcode Valgrind flags in tests/Makefile.am so that
tests/Makefile doesn't need to be rebuilt to use different flags.  Not
everybody is looking for memory leaks.
2006-08-13 04:44:39 -04:00
Behdad Esfahbod
affc9c71ac [Makefile.am] Add $(AM_MAKEFLAGS) to recursive make invocations 2006-08-11 00:24:47 -04:00
Behdad Esfahbod
ee885c76af [test] Update EXTRA_DIST after beos_bitmap -> beos-bitmap change 2006-08-10 18:54:18 -04:00
Behdad Esfahbod
915448e50f [test] Add target check-ref-dups that lists reference images having duplicate sha1sum hash
This is useful to review every once in a while to drop duplicate images that
can be dropped.  For example, if there are two identical images one named
some-test-svg-rgb24-ref.png and other some-test-svg-argb32-ref.png, those two
can be replaced with some-test-svg-ref.png.
2006-08-10 15:35:36 -04:00
Behdad Esfahbod
cecf396f6f [test] Point out to the test log file on failures 2006-08-10 15:11:46 -04:00
Behdad Esfahbod
15074cbb04 [test] Behave better if no ref image was found for a test 2006-08-10 14:58:33 -04:00
Behdad Esfahbod
67ff765e30 [test] Rename beos_bitmap target to beos-bitmap. Same for directfb-bitmap. 2006-08-10 13:53:24 -04:00
Carl Worth
e3c7840d22 Fix EXTRA_DIST so that 'make distcheck' works again 2006-08-08 14:29:29 -07:00
Carl Worth
ca99478d43 Fix some memory leaks in a few of the tests. 2006-08-08 12:48:56 -07:00