PageRenderTime 45ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Perl | 24 lines | 13 code | 7 blank | 4 comment | 0 complexity | d18eac5129c2e53d1c82498a77c92282 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. #!/usr/bin/perl -w
  2. use strict;
  3. use Test::More tests => 4;
  4. BEGIN { use_ok('packageoption_a'); }
  5. BEGIN { use_ok('packageoption_b'); }
  6. # Workaround for
  7. # ok( not (expression) , "test description" );
  8. # does not working in older versions of Perl, eg 5.004_04
  9. sub ok_not ($;$) {
  10. my($test, $name) = @_;
  11. $test = not $test;
  12. ok($test, $name);
  13. }
  14. my $a = CommonPackage::A->new();
  15. isa_ok($a, 'CommonPackage::A');
  16. my $b = CommonPackage::B->new();
  17. isa_ok($b, 'CommonPackage::B');