~ubuntu-branches/ubuntu/jaunty/libglib-perl/jaunty

« back to all changes in this revision

Viewing changes to t/2.t

  • Committer: Bazaar Package Importer
  • Author(s): Marc 'HE' Brockschmidt
  • Date: 2008-03-15 09:40:14 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20080315094014-af0fqrtad5fq1u0f
Tags: 1:1.181-1
New upstream release (only changes in the build system irrelevant for
Debian, but for completeness' sake...)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
1
2
#
2
 
# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/t/2.t,v 1.8 2005/05/30 17:58:25 kaffeetisch Exp $
 
3
# $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/Glib/t/2.t,v 1.9 2007/12/22 19:00:48 kaffeetisch Exp $
3
4
#
4
5
# Really simple smoke tests for Glib::Object wrappers.
5
6
#
8
9
use warnings;
9
10
 
10
11
# Before `make install' is performed this script should be runnable with
11
 
# `make test'. After `make install' it should work as `perl 1.t'
 
12
# `make test'. After `make install' it should work as `perl 2.t'
12
13
 
13
14
#########################
14
15
 
15
 
use Test::More tests => 9;
 
16
use Test::More tests => 10;
16
17
BEGIN { use_ok('Glib'); Glib::Object->set_threadsafe (1); };
17
18
 
18
19
#########################
46
47
is ($obj3, $obj2);
47
48
is ($obj3->{key}, $obj2->{key});
48
49
 
 
50
# regression tests
 
51
 
 
52
# make sure calling a Glib::Object method on something invalid results in an
 
53
# error message, not in a segmentation fault
 
54
eval { Glib::Object->get (123); };
 
55
like ($@, qr/is not of type Glib::Object/);
 
56
 
49
57
 
50
58
__END__
51
59