[cairo-commit] cairo-perl/t CairoSurface.t,1.16,1.17

Torsten Schoenfeld commit at pdx.freedesktop.org
Thu Nov 9 10:44:52 PST 2006


Committed by: tsch

Update of /cvs/cairo/cairo-perl/t
In directory kemper:/tmp/cvs-serv15310/t

Modified Files:
	CairoSurface.t 
Log Message:
	* MakeHelper.pm, CairoSurface.t: When comparing enum values, look
	at length+1, not just length, bytes to discern string pairs like
	'color' and 'color-alpha'.  Duh!  Many thanks to Martijn van Beers
	for finding this bug.


Index: CairoSurface.t
===================================================================
RCS file: /cvs/cairo/cairo-perl/t/CairoSurface.t,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- CairoSurface.t	24 Sep 2006 21:13:15 -0000	1.16
+++ CairoSurface.t	9 Nov 2006 18:44:49 -0000	1.17
@@ -9,7 +9,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 60;
+use Test::More tests => 62;
 
 use constant {
 	IMG_WIDTH => 256,
@@ -50,6 +50,15 @@
 isa_ok ($surf, 'Cairo::ImageSurface');
 isa_ok ($surf, 'Cairo::Surface');
 
+# Test that the enum wrappers differentiate between color and color-alpha.
+# Duh!
+{
+	my $tmp = $surf->create_similar ('color-alpha', IMG_WIDTH, IMG_HEIGHT);
+	is ($tmp->get_content, 'color-alpha');
+	$tmp = $surf->create_similar ('color', IMG_WIDTH, IMG_HEIGHT);
+	is ($tmp->get_content, 'color');
+}
+
 $surf->set_device_offset (23, 42);
 
 SKIP: {



More information about the cairo-commit mailing list