Group
Extension

Matches 55

UUID ( J/JR/JRM/UUID-0.34.tar.gz, JRM, 2024; MetaCPAN )
UUID/t/7compare/v0_v4.t ( view source; MetaCPAN )
, $u0), 0, 'compare binary equal 0';
    is   compare($u1, $u1), 0, 'compare binary equal 1';
    isnt $u0, $u1,             'binary equal';

    my $t0 = compare($u0, $u1);
    my $t1 = compare($u1, 
;
    my $u1 = uuid4();
    isnt $u0, $u1, 'string equal 0';

    my $t0 = compare($u0, $u1);
    my $t1 = compare($u1, $u0);
    isnt $t0, 0,    'string equal 1';
    isnt $t1, 0,    'string equal 2'
UUID ( J/JR/JRM/UUID-0.34.tar.gz, JRM, 2024; MetaCPAN )
UUID/t/7compare/v6_v7.t ( view source; MetaCPAN )
, $u0), 0, 'compare binary equal 0';
    is   compare($u1, $u1), 0, 'compare binary equal 1';
    isnt $u0, $u1,             'binary equal';

    my $t0 = compare($u0, $u1);
    my $t1 = compare($u1, 
;
    my $u1 = uuid7();
    isnt $u0, $u1, 'string equal 0';

    my $t0 = compare($u0, $u1);
    my $t1 = compare($u1, $u0);
    isnt $t0, 0,    'string equal 1';
    isnt $t1, 0,    'string equal 2'
UUID ( J/JR/JRM/UUID-0.34.tar.gz, JRM, 2024; MetaCPAN )
UUID/t/0ld/3time.t ( view source; MetaCPAN )
($bin, $t, $str);

UUID::generate_time($bin);
ok 1, 'gen1';
$t = UUID::time($bin);
ok 1, 'time1';
isnt $t, 0, 'time1';
UUID::unparse($bin, $str);
ok 1, 'unparse1';
note 'UUID      : ', $str;
note 'UUI
 scalar(time);

UUID::generate_random($bin);
ok 1, 'gen2';
$t = UUID::time($bin);
ok 1, 'time2';
#isnt $t, 0, 'time2';  #broken by api change (JRM)
UUID::unparse($bin, $str);
ok 1, 'unparse2';
note 'U
note 'UUID time : ', $t;

UUID::clear($bin);
ok 1, 'gen3';
$t = UUID::time($bin);
ok 1, 'time3';
#isnt $t, 0, 'time3';  #broken by api change (JRM)
UUID::unparse($bin, $str);
ok 1, 'unparse3';
note 'U
UUID ( J/JR/JRM/UUID-0.34.tar.gz, JRM, 2024; MetaCPAN )
UUID/t/3time.t ( view source; MetaCPAN )
($bin, $t, $str);

UUID::generate_time($bin);
ok 1, 'gen1';
$t = UUID::time($bin);
ok 1, 'time1';
isnt $t, 0, 'time1';
UUID::unparse($bin, $str);
ok 1, 'unparse1';
note 'UUID      : ', $str;
note 'UUI
';
isnt $t, 0, 'time2';
UUID::unparse($bin, $str);
ok 1, 'unparse2';
note 'UUID      : ', $str;
note 'UUID time : ', $t;

UUID::clear($bin);
ok 1, 'gen3';
$t = UUID::time($bin);
ok 1, 'time3';
isnt $t
UUID ( J/JR/JRM/UUID-0.34.tar.gz, JRM, 2024; MetaCPAN )
UUID/t/7compare/v4_v0.t ( view source; MetaCPAN )
   'is null';
    isnt $u4, $u0,             'binary not null';
    is   compare($u4, $u0), 1, 'greater than binary';
}

{# string
    my $u4 = uuid4();
    my $u0 = uuid0();
    isnt $u4, $u0,       
UUID ( J/JR/JRM/UUID-0.34.tar.gz, JRM, 2024; MetaCPAN )
UUID/t/7compare/v7_v0.t ( view source; MetaCPAN )
   'is null';
    isnt $u7, $u0,             'binary not null';
    is   compare($u7, $u0), 1, 'greater than binary';
}

{# string
    my $u7 = uuid7();
    my $u0 = uuid0();
    isnt $u7, $u0,       
UUID ( J/JR/JRM/UUID-0.34.tar.gz, JRM, 2024; MetaCPAN )
UUID/t/7compare/v1_v0.t ( view source; MetaCPAN )
   '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,       
UUID ( J/JR/JRM/UUID-0.34.tar.gz, JRM, 2024; MetaCPAN )
UUID/t/7compare/junk.t ( view source; MetaCPAN )
use Test::More;
use MyNote;
use UUID ':all';

ok 1, 'loaded';

{# junk 16
    #
    # this really isnt a "test", per se, but rather a
    # demonstration of what UUID will do. it sees these
    # two 
 $u0),  1, 'compare junk 16 equal 1';
}

{# junk 17
    #
    # what if one of the binary "uuid"s isnt? it reverts
    # to simple string compare.
    #
    my $u0 = '12345678901234567';
    my $u1 = 
UUID ( J/JR/JRM/UUID-0.34.tar.gz, JRM, 2024; MetaCPAN )
UUID/t/7compare/v5_v0.t ( view source; MetaCPAN )
;
    isnt $u5, $u0,             'binary not null';
    is   compare($u5, $u0), 1, 'greater than binary';
}

{# string
    my $u5 = uuid5(dns => 'www.example.com');
    my $u0 = uuid0();
    isnt $u5,
UUID ( J/JR/JRM/UUID-0.34.tar.gz, JRM, 2024; MetaCPAN )
UUID/t/7compare/v6_v0.t ( view source; MetaCPAN )
   'is null';
    isnt $u6, $u0,             'binary not null';
    is   compare($u6, $u0), 1, 'greater than binary';
}

{# string
    my $u6 = uuid6();
    my $u0 = uuid0();
    isnt $u6, $u0,       
UUID ( J/JR/JRM/UUID-0.34.tar.gz, JRM, 2024; MetaCPAN )
UUID/t/7compare/v3_v0.t ( view source; MetaCPAN )
;
    isnt $u3, $u0,             'binary not null';
    is   compare($u3, $u0), 1, 'greater than binary';
}

{# string
    my $u3 = uuid3(dns => 'www.example.com');
    my $u0 = uuid0();
    isnt $u3,
UUID ( J/JR/JRM/UUID-0.34.tar.gz, JRM, 2024; MetaCPAN )
UUID/t/3copy.t ( view source; MetaCPAN )


UUID::generate_time($bin1);
ok 1, 'generate1';

UUID::generate_time($bin2);
ok 1, 'generate2';

isnt $bin1, $bin2, 'different';

UUID::copy($bin2, $bin1);
ok 1, 'copy';

is UUID::compare($bin1, $bin
UUID ( J/JR/JRM/UUID-0.34.tar.gz, JRM, 2024; MetaCPAN )
UUID/t/0ld/9old_test.t ( view source; MetaCPAN )
in1 );
$bin2 = $bin1;
is UUID::compare( $bin1, $bin2 ), 0;

# make sure we get back a null if src isnt sane
$bin1 = 'x';
UUID::copy( $bin2, $bin1 );
ok UUID::is_null( $bin2 );
$bin1 = 'another really 
UUID ( J/JR/JRM/UUID-0.34.tar.gz, JRM, 2024; MetaCPAN )
UUID/t/0ld/3copy.t ( view source; MetaCPAN )


UUID::generate_time($bin1);
ok 1, 'generate1';

UUID::generate_time($bin2);
ok 1, 'generate2';

isnt $bin1, $bin2, 'different';

UUID::copy($bin2, $bin1);
ok 1, 'copy';

is UUID::compare($bin1, $bin
UUID ( J/JR/JRM/UUID-0.34.tar.gz, JRM, 2024; MetaCPAN )
UUID/t/9old_test.t ( view source; MetaCPAN )
in1 );
$bin2 = $bin1;
is UUID::compare( $bin1, $bin2 ), 0;

# make sure we get back a null if src isnt sane
$bin1 = 'x';
UUID::copy( $bin2, $bin1 );
ok UUID::is_null( $bin2 );
$bin1 = 'another really 

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.