PageRenderTime 25ms CodeModel.GetById 0ms RepoModel.GetById 0ms 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
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use Test::More tests => 3;
  5. BEGIN { use_ok('dynamic_cast') }
  6. require_ok('dynamic_cast');
  7. my $f = dynamic_cast::Foo->new();
  8. my $b = dynamic_cast::Bar->new();
  9. my $x = $f->blah();
  10. my $y = $b->blah();
  11. my $a = dynamic_cast::do_test($y);
  12. is($a, "Bar::test");