PageRenderTime 43ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Perl | 17 lines | 10 code | 5 blank | 2 comment | 0 complexity | ed6e6ad9cbbdc2e9b9b3f9322f614aaf 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 => 6;
  5. BEGIN { use_ok('grouping') }
  6. require_ok('grouping');
  7. # adapted from ../python/grouping_runme.py
  8. is(grouping::test1(42), 42);
  9. isnt(eval { grouping::test2(42) }, undef);
  10. is(grouping::do_unary(37, $grouping::NEGATE), -37);
  11. $grouping::test3 = 42;
  12. is($grouping::test3, 42);