File: v1_v0.t

package info (click to toggle)
libuuid-perl 0.37-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,092 kB
  • sloc: ansic: 2,374; perl: 580; makefile: 5
file content (27 lines) | stat: -rw-r--r-- 497 bytes parent folder | download
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
27
#
# compare v1 to v0.
#
use strict;
use warnings;
use Test::More;
use MyNote;
use UUID ':all';

ok 1, 'loaded';

{# binary
    generate_v1(my $u1);
    generate_v0(my $u0);
    ok   is_null($u0),         'is null';
    isnt $u1, $u0,             'binary not null';
    is   compare($u1, $u0), 1, 'greater than binary';
}

{# string
    my $u1 = uuid1();
    my $u0 = uuid0();
    isnt $u1, $u0,             'string not null';
    is   compare($u1, $u0), 1, 'greater than string';
}

done_testing;