PageRenderTime 13ms CodeModel.GetById 2ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Perl | 14 lines | 10 code | 2 blank | 2 comment | 0 complexity | 4ccdc205572b8373626a9077dbc7568d MD5 | raw file
 1#!/usr/bin/perl
 2use strict;
 3use warnings;
 4use Test::More tests => 5;
 5BEGIN { use_ok('wrapmacro') }
 6require_ok('wrapmacro');
 7
 8# adapted from ../python/wrapmacro_runme.py
 9
10my $a = 2;
11my $b = -1;
12is(wrapmacro::maximum($a,$b), 2);
13is(wrapmacro::maximum($a/7.0, -$b*256), 256);
14is(wrapmacro::GUINT16_SWAP_LE_BE_CONSTANT(1), 256);