cairo/test
Kristian Høgsberg 17ec6f1482 The overall idea of this rewrite is that we want to pass the source pattern all the way down into the backends. The motivation for this is that not all backends want a surface for the source operand, and by passing the pattern down, backends can choose to convert it to a surface if they need that.
The patch removes the create_surface function pointer from the surface vtable and moves much of that code into a couple of helper functions. The composite, compsite_trapezoids, and show_glyphs backend functions are updated to take a cairo_pattern_t instead of a surface as the source.
Change these functions to not create a surface for the pattern and just pass the pattern down to the backend functions.
New function to translate a set of trapezoids.
Break out the code to adjust and restore surface transformation and repeat settings into _cairo_pattern_prepare_surface and _cairo_pattern_restore_surface.
Split cairo_pattern_create_for_surface into an init function and a create function.
Utility functions to create a surface from a pattern.
Update these backends to work with the new pattern API. Glitz work by David Reveman.
Update these to pass through the new set of args.
Update this reference image as we now render it correctly.
2005-01-27 10:46:20 +00:00
..
.cvsignore test/imagediff.c 2005-01-25 14:45:31 +00:00
buffer-diff.c test/imagediff.c 2005-01-25 14:45:31 +00:00
buffer-diff.h test/imagediff.c 2005-01-25 14:45:31 +00:00
buffer_diff.c test/imagediff.c 2005-01-25 14:45:31 +00:00
buffer_diff.h test/imagediff.c 2005-01-25 14:45:31 +00:00
cairo-test.c New test case, covering various combinations of pattern types, drawing operations and clipping. Currently fails, for some combinations, coverage-ref.png is just a placeholder. 2005-01-26 13:41:55 +00:00
cairo-test.h New test case, covering various combinations of pattern types, drawing operations and clipping. Currently fails, for some combinations, coverage-ref.png is just a placeholder. 2005-01-26 13:41:55 +00:00
cairo_test.c New test case, covering various combinations of pattern types, drawing operations and clipping. Currently fails, for some combinations, coverage-ref.png is just a placeholder. 2005-01-26 13:41:55 +00:00
cairo_test.h New test case, covering various combinations of pattern types, drawing operations and clipping. Currently fails, for some combinations, coverage-ref.png is just a placeholder. 2005-01-26 13:41:55 +00:00
clip-twice-ref.png New test case to verify that the clip surface is correctly updated when extending an existing clip path. 2005-01-26 21:46:01 +00:00
clip-twice.c New test case to verify that the clip surface is correctly updated when extending an existing clip path. 2005-01-26 21:46:01 +00:00
clip_twice-ref.png New test case to verify that the clip surface is correctly updated when extending an existing clip path. 2005-01-26 21:46:01 +00:00
clip_twice.c New test case to verify that the clip surface is correctly updated when extending an existing clip path. 2005-01-26 21:46:01 +00:00
coverage-ref.png The overall idea of this rewrite is that we want to pass the source pattern all the way down into the backends. The motivation for this is that not all backends want a surface for the source operand, and by passing the pattern down, backends can choose to convert it to a surface if they need that. 2005-01-27 10:46:20 +00:00
coverage.c Set alpha to 1 before setting clip mask. 2005-01-26 14:21:53 +00:00
fill-rule-ref.png Update reference images for new rasterization in libpixman 0.1.3. 2005-01-21 11:27:56 +00:00
fill-rule.c Add big_star_path which shows we still have fill bugs, (even now that little_star_path is working). 2005-01-12 14:38:22 +00:00
fill_rule-ref.png Update reference images for new rasterization in libpixman 0.1.3. 2005-01-21 11:27:56 +00:00
fill_rule.c Add big_star_path which shows we still have fill bugs, (even now that little_star_path is working). 2005-01-12 14:38:22 +00:00
imagediff.c test/imagediff.c 2005-01-25 14:45:31 +00:00
leaky-polygon-ref.png Update reference images for new rasterization in libpixman 0.1.3. 2005-01-21 11:27:56 +00:00
leaky-polygon.c test/Makefile.am 2005-01-13 14:50:35 +00:00
leaky_polygon-ref.png Update reference images for new rasterization in libpixman 0.1.3. 2005-01-21 11:27:56 +00:00
leaky_polygon.c test/Makefile.am 2005-01-13 14:50:35 +00:00
line-width-ref.png Update reference images for new rasterization in libpixman 0.1.3. 2005-01-21 11:27:56 +00:00
line-width.c Add initial regression test suite. 2004-10-26 14:38:43 +00:00
line_width-ref.png Update reference images for new rasterization in libpixman 0.1.3. 2005-01-21 11:27:56 +00:00
line_width.c Add initial regression test suite. 2004-10-26 14:38:43 +00:00
Makefile.am New test case to verify that the clip surface is correctly updated when extending an existing clip path. 2005-01-26 21:46:01 +00:00
move-to-show-surface-ref.png Add initial regression test suite. 2004-10-26 14:38:43 +00:00
move-to-show-surface.c Add initial regression test suite. 2004-10-26 14:38:43 +00:00
move_to_show_surface-ref.png Add initial regression test suite. 2004-10-26 14:38:43 +00:00
move_to_show_surface.c Add initial regression test suite. 2004-10-26 14:38:43 +00:00
read-png.c Add initial regression test suite. 2004-10-26 14:38:43 +00:00
read-png.h Add initial regression test suite. 2004-10-26 14:38:43 +00:00
read_png.c Add initial regression test suite. 2004-10-26 14:38:43 +00:00
read_png.h Add initial regression test suite. 2004-10-26 14:38:43 +00:00
README Add paragraph on new features. 2004-10-26 16:31:31 +00:00
romedalen.png New test case, covering various combinations of pattern types, drawing operations and clipping. Currently fails, for some combinations, coverage-ref.png is just a placeholder. 2005-01-26 13:41:55 +00:00
text-cache-crash.c Disabled test that was killing my machine for some reason. Scary. 2004-12-20 08:08:29 +00:00
text-rotate.c (draw): Move x_off, y_off calculation outside of loop to emphasize loop-independence. 2004-11-09 14:27:32 +00:00
text_cache_crash.c Disabled test that was killing my machine for some reason. Scary. 2004-12-20 08:08:29 +00:00
text_rotate.c (draw): Move x_off, y_off calculation outside of loop to emphasize loop-independence. 2004-11-09 14:27:32 +00:00
write-png.c test/imagediff.c 2005-01-25 14:45:31 +00:00
write-png.h test/imagediff.c 2005-01-25 14:45:31 +00:00
write_png.c test/imagediff.c 2005-01-25 14:45:31 +00:00
write_png.h test/imagediff.c 2005-01-25 14:45:31 +00:00
xmalloc.c Add initial regression test suite. 2004-10-26 14:38:43 +00:00
xmalloc.h Add initial regression test suite. 2004-10-26 14:38:43 +00:00

Regression test suite for cairo.

Using this test should be as simple as running:

	make check

assuming that the cairo distribution in the directory above has been
configured and built. The test suite here goes through some effort to
run against the locally compiled library rather than any installed
version.

The test suite needs to be run before any code is committed and before
any release. Here are the rules governing the use of the suite:

Before committing
-----------------

All tests should return a result of PASS or XFAIL. The XFAIL results
indicate known bugs. The final message should be one of the following:

	All XX tests behaved as expected (YY expected failures)
	All XX tests passed

If any tests have a status of FAIL, then the new code has caused a
regression error which should be fixed before the code is committed.

When a new bug is found
-----------------------
A new test case should be added by imitating the style of an existing
test. This means adding the following files:

	new_bug.c
	new_bug-ref.png

Where new_bug.c is a minimal program to demonstrate the bug, following
the style of existing tests. The new_bug-ref.png image should contain
the desired result of new_bug.c if the bug were fixed.

Makefile.am should be edited, adding new_bug.c to both the TESTS and
XFAIL_TESTS lists.

When a new feature is added
---------------------------
It's important for the regression suite to keep pace with development
of the library. So a new test should be added for each new
feature. The work involved is similar the work described above for new
bugs. The only distinction is that the test is expected to pass so it
should not be added to the XFAIL_TESTS list.


When a bug is fixed
-------------------
The fix should be verified by running the test suite which should
result in an "unexpected pass" for the test of interest. Rejoice as
appropriate, then remove the relevant file name from the XFAIL_TESTS
variable in Makefile.am.

Before releasing
----------------
All tests should return a result of PASS meaning all known bugs are
fixed, resulting in the happy message:

	All XX tests passed