PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Perl | 13 lines | 11 code | 1 blank | 1 comment | 0 complexity | c8898ce5359ffe31fdc48e4d49818c84 MD5 | raw file
 1#!/usr/bin/perl
 2use strict;
 3use warnings;
 4use Test::More tests => 3;
 5BEGIN { use_ok('dynamic_cast') }
 6require_ok('dynamic_cast');
 7
 8my $f = dynamic_cast::Foo->new();
 9my $b = dynamic_cast::Bar->new();
10my $x = $f->blah();
11my $y = $b->blah();
12my $a = dynamic_cast::do_test($y);
13is($a, "Bar::test");