[cairo-commit] cairo-perl/t Cairo.t,1.7,1.8 CairoSurface.t,1.6,1.7

Torsten Schoenfeld commit at pdx.freedesktop.org
Sat Jun 3 07:21:11 PDT 2006


Committed by: tsch

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

Modified Files:
	Cairo.t CairoSurface.t 
Log Message:
	* Cairo.pm: Document Cairo::get_group_target, Cairo::new_sub_path,
	Cairo::Pattern::get_type, Cairo::set_scaled_font, Cairo::version,
	and Cairo::version_string.

	* t/Cairo.t, Cairo.xs: Allow Cairo::version[_string] to be called
	as a function and as a class method.

	* CairoPattern.xs, CairoSurface.xs, t/CairoSurface.t, Makefile.PL,
	examples/simple.pl, examples/png/caps_joins.pl,
	examples/png/hering.pl: Whitespace fixes.

	* t/CairoSurface.t, CairoSurface.xs: Wrap
	cairo_surface_get_content.

	* MakeHelper.pm: Don't add a linebreak to croaks so perl prints
	line information.

	* Makefile.PL: Require cairo 1.1.7.

	* examples/png/README, examples/png/bevels.pl,
	examples/png/spline-pipeline.pl, examples/png/text-rotate.pl,
	examples/png/text.pl: New example ports.


Index: Cairo.t
===================================================================
RCS file: /cvs/cairo/cairo-perl/t/Cairo.t,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Cairo.t	7 May 2006 14:17:39 -0000	1.7
+++ Cairo.t	3 Jun 2006 14:21:10 -0000	1.8
@@ -9,7 +9,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 54;
+use Test::More tests => 56;
 
 use constant {
 	IMG_WIDTH => 256,
@@ -20,9 +20,12 @@
 	use_ok ('Cairo');
 }
 
-ok(Cairo::version > 0);
+ok(defined Cairo::version);
 ok(defined Cairo::version_string);
 
+ok(defined Cairo->version);
+ok(defined Cairo->version_string);
+
 my $surf = Cairo::ImageSurface->create ('rgb24', IMG_WIDTH, IMG_HEIGHT);
 isa_ok ($surf, 'Cairo::Surface');
 

Index: CairoSurface.t
===================================================================
RCS file: /cvs/cairo/cairo-perl/t/CairoSurface.t,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- CairoSurface.t	14 May 2006 13:43:10 -0000	1.6
+++ CairoSurface.t	3 Jun 2006 14:21:10 -0000	1.7
@@ -9,7 +9,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 42;
+use Test::More tests => 43;
 
 use constant {
 	IMG_WIDTH => 256,
@@ -21,6 +21,7 @@
 my $surf = Cairo::ImageSurface->create ('rgb24', IMG_WIDTH, IMG_HEIGHT);
 isa_ok ($surf, 'Cairo::ImageSurface');
 isa_ok ($surf, 'Cairo::Surface');
+is ($surf->get_content, 'color');
 
 $surf = Cairo::ImageSurface->create_for_data ('Urgs!', 'rgb24',
                                               IMG_WIDTH, IMG_HEIGHT, 23);
@@ -49,14 +50,14 @@
 
 	$surf = Cairo::ImageSurface->create ('rgb24', IMG_WIDTH, IMG_HEIGHT);
 	is ($surf->write_to_png ('tmp.png'), 'success');
-	
+
 	is ($surf->write_to_png_stream (sub {
 		my ($closure, $data) = @_;
 		is ($closure, 'blub');
 		like ($data, qr/PNG/);
 		die 'write-error';
 	}, 'blub'), 'no-memory');
-	
+
 	is ($surf->write_to_png_stream (sub {
 		my ($closure, $data) = @_;
 		is ($closure, undef);
@@ -134,7 +135,7 @@
 
 	$surf->set_dpi (72, 72);
 	$surf->set_size (23, 42);
-	
+
 	$surf->dsc_comment("Bla?");
 	$surf->dsc_begin_setup;
 	$surf->dsc_begin_page_setup;



More information about the cairo-commit mailing list