[cairo-commit] cairo-perl/t CairoSurface.t,1.26,1.27

Torsten Schoenfeld commit at pdx.freedesktop.org
Mon Jan 7 09:34:12 PST 2008


Committed by: tsch

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

Modified Files:
	CairoSurface.t 
Log Message:
	* CairoSurface.xs
	* t/CairoSurface.t: Wrap cairo_ps_surface_restrict_to_level,
	cairo_ps_get_levels, and cairo_ps_level_to_string.


Index: CairoSurface.t
===================================================================
RCS file: /cvs/cairo/cairo-perl/t/CairoSurface.t,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- CairoSurface.t	7 Jan 2008 17:13:33 -0000	1.26
+++ CairoSurface.t	7 Jan 2008 17:34:09 -0000	1.27
@@ -12,7 +12,7 @@
 
 use Config; # for byteorder
 
-use Test::More tests => 66;
+use Test::More tests => 72;
 
 use constant IMG_WIDTH => 256;
 use constant IMG_HEIGHT => 256;
@@ -221,7 +221,7 @@
 }
 
 SKIP: {
-	skip 'ps surface', 8
+	skip 'ps surface', 14
 		unless Cairo::HAS_PS_SURFACE;
 
 	my $surf = Cairo::PsSurface->create ('tmp.ps', IMG_WIDTH, IMG_HEIGHT);
@@ -253,7 +253,6 @@
 
 	unlink 'tmp.ps';
 
-
 	SKIP: {
 		skip 'create_for_stream on ps surfaces', 4
 			unless Cairo::VERSION >= Cairo::VERSION_ENCODE (1, 2, 0);
@@ -271,6 +270,22 @@
 		isa_ok ($surf, 'Cairo::PsSurface');
 		isa_ok ($surf, 'Cairo::Surface');
 	}
+
+	SKIP: {
+		skip 'new stuff', 6
+			unless Cairo::VERSION >= Cairo::VERSION_ENCODE (1, 5, 2); # FIXME: 1.6
+
+		my @levels = Cairo::PsSurface::get_levels();
+		ok (scalar @levels > 0);
+		is ($levels[0], '2');
+
+		@levels = Cairo::PsSurface->get_levels();
+		ok (scalar @levels > 0);
+		is ($levels[0], '2');
+
+		like (Cairo::PsSurface::level_to_string('2'), qr/2/);
+		like (Cairo::PsSurface->level_to_string('3'), qr/3/);
+	}
 }
 
 SKIP: {



More information about the cairo-commit mailing list