PageRenderTime 42ms CodeModel.GetById 17ms RepoModel.GetById 0ms 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
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 => 5;
  5. BEGIN { use_ok('wrapmacro') }
  6. require_ok('wrapmacro');
  7. # adapted from ../python/wrapmacro_runme.py
  8. my $a = 2;
  9. my $b = -1;
  10. is(wrapmacro::maximum($a,$b), 2);
  11. is(wrapmacro::maximum($a/7.0, -$b*256), 256);
  12. is(wrapmacro::GUINT16_SWAP_LE_BE_CONSTANT(1), 256);