cairo/test
Owen Taylor c803908d95 src/cairo.h src/cairo-font.c src/cairoint.h doc/public/cairo-sections.txt: Add cairo_font_face_set/get_user_data().
src/cairo-array.c src/cairoint.h src/cairo-surface.c: Refactor user data code from cairo-surface.c into cairo_user_data_array_t.
Switch these types to be like cairo_surface_t where the generic code frees the wrapper object.
src/cairo-atsui-font.c src/cairo-ft-font.c src/cairo-win32-font.c: Fix up for the above changes.
Implement a complicated mutual-referencing scheme to make sure that a face from cairo_ft_font_face_create_for_ft_face() is freed only when the FT_Face is no longer needed.
Update the docs to describe how to figure out when the FT_Face can be freed.
Fix refcount leaks when creating fonts.
Remove excess call to _cairo_unscaled_font_reference().
Remove stray initialization of font matrix to the identity.
test/user-data.c: Fix a bug when setting/unsetting a key with a free key slot before it, add that to the test case.
Don't append an element when user_data is NULL.
2005-04-08 13:14:17 +00:00
..
.cvsignore Rework the cairo_matrix_t interface in several ways. Expose a struct for cairo_matrix_t. 2005-04-07 10:01:49 +00:00
buffer-diff.c Change type of data parameter from char* to unsigned char*. 2005-04-04 09:47:12 +00:00
buffer-diff.h Change type of data parameter from char* to unsigned char*. 2005-04-04 09:47:12 +00:00
cairo-test.c Change type of data parameter from char* to unsigned char*. 2005-04-04 09:47:12 +00:00
cairo-test.h Change type of data parameter from char* to unsigned char*. 2005-04-04 09:47:12 +00:00
clip-twice-ref.png Update these two once again, this time generated using libpixman-0.1.3 without leaky circles. 2005-01-27 12:28:17 +00:00
clip-twice.c More _/- renames in the test directory. 2005-03-29 00:02:19 +00:00
coverage-ref.png Fix accidental commit of diff, rather than ref image. 2005-03-08 14:30:14 +00:00
coverage.c src/cairo.[ch] src/cairoint.h src/cairo-gstate.c docs/public/cairo-sections.txt: cairo_select_font() => cairo_select_font_face() cairo_scale_font() => cairo_set_font_size() cairo_transform_font() => cairo_set_font_matrix() Add cairo_get_font_matrix(). Make cairo_set_font_face() not reset the font matrix. Default the font matrix to SCALE(10). Document cairo_select_font_face(). 2005-04-07 13:29:32 +00:00
create-for-png-ref.png Change type of data parameter from char* to unsigned char*. 2005-04-04 09:47:12 +00:00
create-for-png.c Change type of data parameter from char* to unsigned char*. 2005-04-04 09:47:12 +00:00
create-from-png-ref.png Change type of data parameter from char* to unsigned char*. 2005-04-04 09:47:12 +00:00
create-from-png.c Change type of data parameter from char* to unsigned char*. 2005-04-04 09:47:12 +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 More _/- renames in the test directory. 2005-03-29 00:02:19 +00:00
get-and-set.c More _/- renames in the test directory. 2005-03-29 00:02:19 +00:00
imagediff.c Fix to return non-zero status on error. 2005-04-07 11:18:40 +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 More _/- renames in the test directory. 2005-03-29 00:02:19 +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 More _/- renames in the test directory. 2005-03-29 00:02:19 +00:00
linear-gradient-ref.png Comment and clean up the gradient computation. (_cairo_linear_pattern_classify): Determine if a linear gradient is horizontal or vertical. (_cairo_pattern_acquire_surface_for_gradient): Optimize horizontal/vertical gradients with a repeating surface. 2005-03-06 12:05:23 +00:00
linear-gradient.c More _/- renames in the test directory. 2005-03-29 00:02:19 +00:00
Makefile.am Rework the cairo_matrix_t interface in several ways. Expose a struct for cairo_matrix_t. 2005-04-07 10:01:49 +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 Make handling of unsigned char* vs. char* consistent. Change all parameters that are actual string data from unsigned char* to char* (cairo_text_extents, cairo_show_text, cairo_text_path). Change all data buffers from char* to unsigned char* (cairo_write_func_t). 2005-04-06 13:01:13 +00:00
path-data-ref.png Add reference image. 2005-03-14 11:49:12 +00:00
path-data.c More _/- renames in the test directory. 2005-03-29 00:02:19 +00:00
pixman-rotate-ref.png New test case which exposes off-by-one rotation error in pixman. 2005-02-07 09:38:43 +00:00
pixman-rotate.c More _/- renames in the test directory. 2005-03-29 00:02:19 +00:00
read-png.c More _/- renames in the test directory. 2005-03-29 00:02:19 +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
testsvg Use the current point to offset just the destination, not the source and destination. With this fix, cairo_show_surface should work with the current point at places other than the origin. 2005-04-02 06:00:32 +00:00
text-cache-crash.c src/cairo.[ch] src/cairoint.h src/cairo-gstate.c docs/public/cairo-sections.txt: cairo_select_font() => cairo_select_font_face() cairo_scale_font() => cairo_set_font_size() cairo_transform_font() => cairo_set_font_matrix() Add cairo_get_font_matrix(). Make cairo_set_font_face() not reset the font matrix. Default the font matrix to SCALE(10). Document cairo_select_font_face(). 2005-04-07 13:29:32 +00:00
text-rotate.c src/cairo.[ch] src/cairoint.h src/cairo-gstate.c docs/public/cairo-sections.txt: cairo_select_font() => cairo_select_font_face() cairo_scale_font() => cairo_set_font_size() cairo_transform_font() => cairo_set_font_matrix() Add cairo_get_font_matrix(). Make cairo_set_font_face() not reset the font matrix. Default the font matrix to SCALE(10). Document cairo_select_font_face(). 2005-04-07 13:29:32 +00:00
transforms-ref.png Rework the cairo_matrix_t interface in several ways. Expose a struct for cairo_matrix_t. 2005-04-07 10:01:49 +00:00
transforms.c Rework the cairo_matrix_t interface in several ways. Expose a struct for cairo_matrix_t. 2005-04-07 10:01:49 +00:00
user-data.c src/cairo.h src/cairo-font.c src/cairoint.h doc/public/cairo-sections.txt: Add cairo_font_face_set/get_user_data(). 2005-04-08 13:14:17 +00:00
write-png.c Change type of data parameter from char* to unsigned char*. 2005-04-04 09:47:12 +00:00
write-png.h Change type of data parameter from char* to unsigned char*. 2005-04-04 09:47:12 +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