PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 1ms 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
 1#!/usr/bin/perl
 2use strict;
 3use warnings;
 4use Test::More tests => 6;
 5BEGIN { use_ok('grouping') }
 6require_ok('grouping');
 7
 8# adapted from ../python/grouping_runme.py
 9
10is(grouping::test1(42), 42);
11
12isnt(eval { grouping::test2(42) }, undef);
13
14is(grouping::do_unary(37, $grouping::NEGATE), -37);
15
16$grouping::test3 = 42;
17is($grouping::test3, 42);