/trunk/Examples/test-suite/perl5/dynamic_cast_runme.pl
Perl | 13 lines | 11 code | 1 blank | 1 comment | 0 complexity | c8898ce5359ffe31fdc48e4d49818c84 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- #!/usr/bin/perl
- use strict;
- use warnings;
- use Test::More tests => 3;
- BEGIN { use_ok('dynamic_cast') }
- require_ok('dynamic_cast');
- my $f = dynamic_cast::Foo->new();
- my $b = dynamic_cast::Bar->new();
- my $x = $f->blah();
- my $y = $b->blah();
- my $a = dynamic_cast::do_test($y);
- is($a, "Bar::test");