File: arg-checks.t

package info (click to toggle)
libglib-object-introspection-perl 0.051-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 584 kB
  • sloc: ansic: 3,543; perl: 2,809; makefile: 9; sh: 3
file content (26 lines) | stat: -rw-r--r-- 480 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env perl

BEGIN { require './t/inc/setup.pl' };

use strict;
use warnings;

plan tests => 8;

{
  is (Regress::test_int8 (-127), -127);
  isa_ok (Regress::TestObj->constructor, 'Regress::TestObj');
}

{
  is (eval { Regress::test_int8 () }, undef);
  like ($@, qr/too few/);

  is (eval { Regress::TestObj::constructor }, undef);
  like ($@, qr/too few/);
}

{
  local $SIG{__WARN__} = sub { like ($_[0], qr/too many/) };
  is (Regress::test_int8 (127, 'bla'), 127);
}