File: Syntax-Operator-Is.t

package info (click to toggle)
libsyntax-keyword-assert-perl 0.16-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 196 kB
  • sloc: perl: 98; pascal: 69; makefile: 3
file content (20 lines) | stat: -rw-r--r-- 476 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use Test2::V0;
use Test2::Require::Module 'Syntax::Operator::Is', '0.02';
use Test2::Require::Module 'XS::Parse::Infix', '0.44';
use Test2::Require::Module 'Data::Checks', '0.09';

use Syntax::Keyword::Assert;
use Syntax::Operator::Is is => { -as => "is_" };
use Data::Checks qw( Str );

subtest 'Test `assert` with Syntax::Operator::Is' => sub {
    ok lives {
        assert ( 'hello' is_ Str );
    };

    ok dies {
        assert ( {} is_ Str );
    };
};

done_testing;