~peter-pearse/ubuntu/natty/libcairo-perl/prop001

« back to all changes in this revision

Viewing changes to t/CairoSurface.t

  • Committer: Bazaar Package Importer
  • Author(s): Marc 'HE' Brockschmidt
  • Date: 2007-10-17 14:31:07 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20071017143107-njhncx7mavojo9lw
Tags: 1.043-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
1
2
#
2
3
# Copyright (c) 2004-2005 by the cairo perl team (see the file README)
3
4
#
4
5
# Licensed under the LGPL, see LICENSE file for more information.
5
6
#
6
 
# $Header: /cvs/cairo/cairo-perl/t/CairoSurface.t,v 1.22 2007/05/27 12:34:20 tsch Exp $
 
7
# $Header: /cvs/cairo/cairo-perl/t/CairoSurface.t,v 1.23 2007-10-07 13:11:59 tsch Exp $
7
8
#
8
9
 
9
10
use strict;
126
127
                my ($closure, $data) = @_;
127
128
                is ($closure, 'blub');
128
129
                like ($data, qr/PNG/);
129
 
                die 'write-error';
 
130
                die 'no-memory';
130
131
        }, 'blub'), 'no-memory');
131
132
 
132
133
        is ($surf->write_to_png_stream (sub {
133
134
                my ($closure, $data) = @_;
134
135
                is ($closure, undef);
135
136
                like ($data, qr/PNG/);
136
 
                die 'write-error';
 
137
                die 'no-memory';
137
138
        }), 'no-memory');
138
139
 
139
140
        $surf = Cairo::ImageSurface->create_from_png ('tmp.png');