Debian Codegraph @

t/7null/basic.t

raw
1 use strict;
2 use warnings;
3 use MyTest;
4 use UUID ':all';
5
6 ok 1, 'loaded';
7
8 {# correct usage
9 generate_v0(my $u0);
10 ok is_null($u0), 'binary is null';
11 }
12 {# check not null uuid
13 generate_v1(my $u0);
14 ok !is_null($u0), 'binary not null';
15 }
16 {# check looks-like-binary-uuid string
17 my $u0 = '123456789abcdef';
18 ok !is_null($u0), 'certain string not null';
19 }
20 {# check random string
21 my $u0 = '123456789';
22 ok !is_null($u0), 'random string not null';
23 }
24 {# check number
25 my $u0 = 123456789;
26 ok !is_null($u0), 'number not null';
27 }
28 {# check undef
29 my $u0 = undef;
30 ok !is_null($u0), 'undef not null';
31 }
32
33 done_testing;