CPANPLUS-Dist-Gentoo

 view release on metacpan or  search on metacpan

t/31-atom-cmp.t  view on Meta::CPAN

#!perl

use strict;
use warnings;

use Test::More tests => 2 * 8 * ((8 * 7) / 2);

use CPANPLUS::Dist::Gentoo::Atom;

sub A () { 'CPANPLUS::Dist::Gentoo::Atom' }

my $a0 = A->new(
 category => 'test',
 name     => 'a',
);

my $a1 = A->new(
 category => 'test',
 name     => 'a',
 version  => '1.0',
 range    => '=',
);

my $a2 = A->new(
 category => 'test',
 name     => 'a',
 version  => '1.0',
 range    => '<',
);

my $a3 = A->new(
 category => 'test',
 name     => 'a',
 version  => '1.0',
 range    => '<=',
);

my $a4 = A->new(
 category => 'test',
 name     => 'a',
 version  => '2.0',
 range    => '=',
);

my $a5 = A->new(
 category => 'test',
 name     => 'a',
 version  => '2.0',
 range    => '>=',
);

my $a6 = A->new(
 category => 'test',
 name     => 'a',
 version  => '2.0',
 range    => '>',
);

my @tests = (
 [ $a0, $a0 =>  0 ],
 [ $a0, $a1 => -1 ],
 [ $a0, $a2 => -1 ],
 [ $a0, $a3 => -1 ],
 [ $a0, $a4 => -1 ],
 [ $a0, $a5 => -1 ],
 [ $a0, $a6 => -1 ],

 [ $a1, $a1 =>  0 ],
 [ $a1, $a2 =>  0 ],
 [ $a1, $a3 =>  0 ],



( run in 0.563 second using v1.01-cache-2.11-cpan-8dfa8b56332 )