File: Type-Tiny.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 (17 lines) | stat: -rw-r--r-- 313 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use Test2::V0;
use Test2::Require::Module 'Type::Tiny', '2.000000';

use Syntax::Keyword::Assert;
use Types::Standard -types;

subtest 'Test `assert` with Type::Tiny' => sub {
    ok lives {
        assert ( Str->check('hello') );
    };

    ok dies {
        assert ( Str->check({}) );
    };
};

done_testing;