[cairo-commit] cairo-perl/t Cairo.t, 1.16, 1.16.2.1 CairoFont.t, 1.4, 1.4.6.1 CairoPath.t, 1.1, 1.1.6.1 CairoPattern.t, 1.9, 1.9.2.1 CairoSurface.t, 1.23, 1.23.2.1

Torsten Schoenfeld commit at pdx.freedesktop.org
Tue Nov 20 12:01:10 PST 2007


Committed by: tsch

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

Modified Files:
      Tag: stable-1-04
	Cairo.t CairoFont.t CairoPath.t CairoPattern.t CairoSurface.t 
Log Message:
	* Cairo.pm: Add entries for the various surfaces to the API
	listing.

	* Makefile.PL: Update the list of exported symbols.  (Reported by
	spicy jack)

	* t/Cairo.t
	* t/CairoPattern.t: When Test::Number::Delta is not available,
	skip the relevant tests instead of faking passes.  (Suggested by
	Aristotle Pagaltzis)

	* t/Cairo.t
	* t/CairoFont.t
	* t/CairoPath.t
	* t/CairoPattern.t
	* t/CairoSurface.t: Don't use the hash-ref variant of the constant
	pragma.  It's not supported by the version that ships with perl
	5.6.


Index: Cairo.t
===================================================================
RCS file: /cvs/cairo/cairo-perl/t/Cairo.t,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -u -d -r1.16 -r1.16.2.1
--- Cairo.t	13 Oct 2007 21:23:16 -0000	1.16
+++ Cairo.t	20 Nov 2007 20:01:07 -0000	1.16.2.1
@@ -13,15 +13,12 @@
 use Test::More tests => 68;
 
 unless (eval 'use Test::Number::Delta; 1;') {
-	*delta_ok = sub {
-        	ok(1, 'Fake delta_ok');
-	}
+	my $reason = 'Test::Number::Delta not available';
+	*delta_ok = sub { SKIP: { skip $reason, 1 } };
 }
 
-use constant {
-	IMG_WIDTH => 256,
-	IMG_HEIGHT => 256,
-};
+use constant IMG_WIDTH => 256;
+use constant IMG_HEIGHT => 256;
 
 BEGIN {
 	use_ok ('Cairo');

Index: CairoFont.t
===================================================================
RCS file: /cvs/cairo/cairo-perl/t/CairoFont.t,v
retrieving revision 1.4
retrieving revision 1.4.6.1
diff -u -d -r1.4 -r1.4.6.1
--- CairoFont.t	10 Aug 2006 17:34:40 -0000	1.4
+++ CairoFont.t	20 Nov 2007 20:01:08 -0000	1.4.6.1
@@ -1,3 +1,4 @@
+#!/usr/bin/perl
 #
 # Copyright (c) 2004-2005 by the cairo perl team (see the file README)
 #
@@ -11,10 +12,8 @@
 
 use Test::More tests => 20;
 
-use constant {
-	IMG_WIDTH => 256,
-	IMG_HEIGHT => 256,
-};
+use constant IMG_WIDTH => 256;
+use constant IMG_HEIGHT => 256;
 
 use Cairo;
 

Index: CairoPath.t
===================================================================
RCS file: /cvs/cairo/cairo-perl/t/CairoPath.t,v
retrieving revision 1.1
retrieving revision 1.1.6.1
diff -u -d -r1.1 -r1.1.6.1
--- CairoPath.t	12 Jul 2005 20:29:49 -0000	1.1
+++ CairoPath.t	20 Nov 2007 20:01:08 -0000	1.1.6.1
@@ -1,3 +1,4 @@
+#!/usr/bin/perl
 #
 # Copyright (c) 2004-2005 by the cairo perl team (see the file README)
 #
@@ -12,10 +13,8 @@
 
 use Test::More tests => 4;
 
-use constant {
-	IMG_WIDTH => 256,
-	IMG_HEIGHT => 256,
-};
+use constant IMG_WIDTH => 256;
+use constant IMG_HEIGHT => 256;
 
 my $surf = Cairo::ImageSurface->create ('rgb24', IMG_WIDTH, IMG_HEIGHT);
 my $cr = Cairo::Context->create ($surf);

Index: CairoPattern.t
===================================================================
RCS file: /cvs/cairo/cairo-perl/t/CairoPattern.t,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -u -d -r1.9 -r1.9.2.1
--- CairoPattern.t	13 Oct 2007 21:23:16 -0000	1.9
+++ CairoPattern.t	20 Nov 2007 20:01:08 -0000	1.9.2.1
@@ -13,15 +13,12 @@
 use Test::More tests => 25;
 
 unless (eval 'use Test::Number::Delta; 1;') {
-	*delta_ok = sub {
-		ok(1, 'Fake delta_ok');
-	}
+	my $reason = 'Test::Number::Delta not available';
+	*delta_ok = sub { SKIP: { skip $reason, 1 } };
 }
 
-use constant {
-	IMG_WIDTH => 256,
-	IMG_HEIGHT => 256,
-};
+use constant IMG_WIDTH => 256;
+use constant IMG_HEIGHT => 256;
 
 use Cairo;
 

Index: CairoSurface.t
===================================================================
RCS file: /cvs/cairo/cairo-perl/t/CairoSurface.t,v
retrieving revision 1.23
retrieving revision 1.23.2.1
diff -u -d -r1.23 -r1.23.2.1
--- CairoSurface.t	7 Oct 2007 13:11:59 -0000	1.23
+++ CairoSurface.t	20 Nov 2007 20:01:08 -0000	1.23.2.1
@@ -14,10 +14,8 @@
 
 use Test::More tests => 64;
 
-use constant {
-	IMG_WIDTH => 256,
-	IMG_HEIGHT => 256,
-};
+use constant IMG_WIDTH => 256;
+use constant IMG_HEIGHT => 256;
 
 use Cairo;
 



More information about the cairo-commit mailing list