[perl-Cairo] Fix spurious CairoSurface.t failures



commit a5117e6643b26a736d308dc6cf3dab3e101448e3
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Sat Apr 30 15:41:10 2011 +0200

    Fix spurious CairoSurface.t failures
    
    These were caused by a premature call to $surf->finish which made the
    surface that tests were run against unusable.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=632040

 t/CairoSurface.t |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/t/CairoSurface.t b/t/CairoSurface.t
index 9c00673..fb4dea3 100644
--- a/t/CairoSurface.t
+++ b/t/CairoSurface.t
@@ -72,11 +72,9 @@ is ($surf->get_height, IMG_HEIGHT);
 	}
 }
 
-$surf->finish;
-
-$surf = $surf->create_similar ('color', IMG_WIDTH, IMG_HEIGHT);
-isa_ok ($surf, 'Cairo::ImageSurface');
-isa_ok ($surf, 'Cairo::Surface');
+my $similar = $surf->create_similar ('color', IMG_WIDTH, IMG_HEIGHT);
+isa_ok ($similar, 'Cairo::ImageSurface');
+isa_ok ($similar, 'Cairo::Surface');
 
 # Test that the enum wrappers differentiate between color and color-alpha.
 SKIP: {
@@ -130,6 +128,8 @@ SKIP: {
 	ok (defined $surf->has_show_text_glyphs);
 }
 
+$surf->finish;
+
 # --------------------------------------------------------------------------- #
 
 sub clear {



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