[perl-Cairo] Remove the create_similar TODO tests in CairoSurface.t



commit 4893c3375d52c8f258289c4fc86fb95ad8d33388
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Sat Apr 30 15:43:49 2011 +0200

    Remove the create_similar TODO tests in CairoSurface.t
    
    They were trying to test the type of the surfaces returned by
    create_similar, which seem to be unpredictable.

 t/CairoSurface.t |   27 +++++----------------------
 1 files changed, 5 insertions(+), 22 deletions(-)
---
diff --git a/t/CairoSurface.t b/t/CairoSurface.t
index fb4dea3..178a813 100644
--- a/t/CairoSurface.t
+++ b/t/CairoSurface.t
@@ -12,7 +12,7 @@ use warnings;
 
 use Config; # for byteorder
 
-use Test::More tests => 74;
+use Test::More tests => 72;
 
 use constant IMG_WIDTH => 256;
 use constant IMG_HEIGHT => 256;
@@ -195,7 +195,7 @@ SKIP: {
 }
 
 SKIP: {
-	skip 'pdf surface', 8
+	skip 'pdf surface', 7
 		unless Cairo::HAS_PDF_SURFACE;
 
 	my $surf = Cairo::PdfSurface->create ('tmp.pdf', IMG_WIDTH, IMG_HEIGHT);
@@ -209,19 +209,10 @@ SKIP: {
 		$surf->set_size (23, 42);
 	}
 
+	# create_similar might return any kind of surface
 	$surf = $surf->create_similar ('alpha', IMG_WIDTH, IMG_HEIGHT);
 	isa_ok ($surf, 'Cairo::Surface');
 
-	# create_similar actually returns an image surface at the moment, but
-	# the compatibility layer has no way of knowing this and thus turns it
-	# into a pdf surface.  Recently, it also started returning meta
-	# surfaces whose type is internal, so the bindings have no other choice
-	# but represent them as plain surfaces.  Thus, mark this TODO for now.
-	TODO: {
-		local $TODO = 'create_similar returns surfaces whose type is not predictable';
-		isa_ok ($surf, 'Cairo::ImageSurface');
-	}
-
 	unlink 'tmp.pdf';
 
 	SKIP: {
@@ -240,7 +231,7 @@ SKIP: {
 }
 
 SKIP: {
-	skip 'ps surface', 15
+	skip 'ps surface', 14
 		unless Cairo::HAS_PS_SURFACE;
 
 	my $surf = Cairo::PsSurface->create ('tmp.ps', IMG_WIDTH, IMG_HEIGHT);
@@ -262,18 +253,10 @@ SKIP: {
 		$surf->dsc_begin_page_setup;
 	}
 
+	# create_similar might return any kind of surface
 	$surf = $surf->create_similar ('alpha', IMG_WIDTH, IMG_HEIGHT);
 	isa_ok ($surf, 'Cairo::Surface');
 
-	# create_similar actually returns an image surface at the moment, but
-	# the compatibility layer has no way of knowing this and thus turns it
-	# into a ps surface.
-	if (Cairo::VERSION >= Cairo::VERSION_ENCODE (1, 2, 0)) {
-		isa_ok ($surf, 'Cairo::ImageSurface');
-	} else {
-		isa_ok ($surf, 'Cairo::PsSurface');
-	}
-
 	unlink 'tmp.ps';
 
 	SKIP: {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]