PageRenderTime 31ms CodeModel.GetById 23ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/perl5/typedef_class_runme.pl

#
Perl | 16 lines | 12 code | 2 blank | 2 comment | 0 complexity | 2f5c1e7d66397bd361eed2a9811ed1c1 MD5 | raw file
 1#!/usr/bin/perl
 2use strict;
 3use warnings;
 4use Test::More tests => 6;
 5BEGIN { use_ok('typedef_class') }
 6require_ok('typedef_class');
 7
 8# adapted from ../python/typedef_class_runme.py
 9
10my $a = typedef_class::RealA->new();
11isa_ok($a, 'typedef_class::RealA');
12$a->{a} = 3;
13is($a->{a}, 3);
14my $b = typedef_class::B->new();
15isa_ok($b, 'typedef_class::B');
16is($b->testA($a), 3);