[cairo-commit] cairo/test Makefile.am, 1.5, 1.6 text_cache_crash.c, 1.2, 1.3

Carl Worth commit at pdx.freedesktop.org
Tue Nov 23 13:38:11 PST 2004


Committed by: cworth

Update of /cvs/cairo/cairo/test
In directory gabe:/tmp/cvs-serv12019/test

Modified Files:
	Makefile.am text_cache_crash.c 
Log Message:

        * test/Makefile.am (XFAIL_TESTS): Note that text_cache_crash is
        expected to fail.

        * test/text_cache_crash.c (draw): Add test to demonstrate bug when
        item is too big for cache.

        * src/cairo_cache.c (_cache_sane_state): Really remove that
        refcount assertion this time.


Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/cairo/test/Makefile.am,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Makefile.am	4 Nov 2004 22:23:50 -0000	1.5
+++ Makefile.am	23 Nov 2004 21:38:09 -0000	1.6
@@ -13,7 +13,6 @@
 fill_rule-ref.png \
 line_width-ref.png \
 move_to_show_surface-ref.png \
-text_cache_crash-ref.png \
 text_rotate-ref.png
 
 # This list is only for known bugs (not regressions). We do need to
@@ -26,6 +25,7 @@
 # be fixed before the code is committed.
 XFAIL_TESTS = \
 move_to_show_surface \
+text_cache_crash \
 text_rotate
 
 check_PROGRAMS = $(TESTS)

Index: text_cache_crash.c
===================================================================
RCS file: /cvs/cairo/cairo/test/text_cache_crash.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- text_cache_crash.c	23 Nov 2004 20:53:47 -0000	1.2
+++ text_cache_crash.c	23 Nov 2004 21:38:09 -0000	1.3
@@ -72,6 +72,7 @@
 static void
 draw (cairo_t *cr, int width, int height)
 {
+    /* Once there was a bug that choked when selecting the same font twice. */
     cairo_select_font(cr, "sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
     cairo_scale_font(cr, 40.0);
 
@@ -79,6 +80,11 @@
     cairo_scale_font(cr, 40.0);
     cairo_move_to(cr, 10, 50);
     cairo_show_text(cr, "hello");
+
+    /* Then there was a bug that choked when selecting a font too big
+     * for the cache. */
+    cairo_scale_font (cr, 500);
+    cairo_show_text (cr, "hello");
 }
 
 int




More information about the cairo-commit mailing list