Skip Menu |
 

This queue is for tickets about the List-Compare CPAN distribution.

Report information
The Basics
Id: 104452
Status: resolved
Priority: 0/
Queue: List-Compare

People
Owner: jkeenan [...] cpan.org
Requestors: jkeenan [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.50
Fixed in: 0.52



Subject: List::Compare::Functional::is_LsubsetR: incorrect results in v0.50
Download (untitled) / with headers
text/plain 317b
When file 50_lcf_subset.t (attached) is placed in the 't/' subdirectory and run against recently uploaded v0.50 of List::Compare::Functional, test failures emerge as shown in attachment. The object-oriented interface does not appear to be adversely affected, as can be seen by running 49_lc_subset.t (also attached).
Subject: 49_lc_subset.t
Download 49_lc_subset.t
text/x-perl 3.7k
# perl #$Id$ # 50_lcf_subset.t use strict; use Test::More qw(no_plan); # tests => 51; use List::Compare; my @a0 = ( qw| alpha | ); my @a1 = ( qw| alpha beta | ); my @a2 = ( qw| alpha beta gamma | ); my ($lc, $LR, $RL); $lc = List::Compare->new( \@a0, \@a1 ); $LR = $lc->is_LsubsetR(); ok($LR, "simple: left is subset of right"); $LR = $lc->is_AsubsetB(); ok($LR, "simple: left is subset of right"); $RL = $lc->is_RsubsetL(); ok(! $RL, "simple: right is not subset of left"); $RL = $lc->is_BsubsetA(); ok(! $RL, "simple: right is not subset of left"); $lc = List::Compare->new( '-u', \@a0, \@a1 ); $LR = $lc->is_LsubsetR(); ok($LR, "simple unsorted: left is subset of right"); $LR = $lc->is_AsubsetB(); ok($LR, "simple unsorted: left is subset of right"); $RL = $lc->is_RsubsetL(); ok(! $RL, "simple unsorted: right is not subset of left"); $RL = $lc->is_BsubsetA(); ok(! $RL, "simple unsorted: right is not subset of left"); $lc = List::Compare->new( '--unsorted', \@a0, \@a1 ); $LR = $lc->is_LsubsetR(); ok($LR, "simple unsorted long: left is subset of right"); $LR = $lc->is_AsubsetB(); ok($LR, "simple unsorted long: left is subset of right"); $RL = $lc->is_RsubsetL(); ok(! $RL, "simple unsorted long: right is not subset of left"); $RL = $lc->is_BsubsetA(); ok(! $RL, "simple unsorted long: right is not subset of left"); $lc = List::Compare->new( { lists => [ \@a0, \@a1 ] } ); $LR = $lc->is_LsubsetR(); ok($LR, "lists: left is subset of right"); $LR = $lc->is_AsubsetB(); ok($LR, "lists: left is subset of right"); $RL = $lc->is_RsubsetL(); ok(! $RL, "lists: right is not subset of left"); $RL = $lc->is_BsubsetA(); ok(! $RL, "lists: right is not subset of left"); $lc = List::Compare->new( { lists => [ \@a0, \@a1 ], unsorted => 1 } ); $LR = $lc->is_LsubsetR(); ok($LR, "lists: left is subset of right"); $LR = $lc->is_AsubsetB(); ok($LR, "lists: left is subset of right"); $RL = $lc->is_RsubsetL(); ok(! $RL, "lists: right is not subset of left"); $RL = $lc->is_BsubsetA(); ok(! $RL, "lists: right is not subset of left"); $lc = List::Compare->new( '-a', \@a0, \@a1 ); $LR = $lc->is_LsubsetR(); ok($LR, "simple accelerated: left is subset of right"); $LR = $lc->is_AsubsetB(); ok($LR, "simple accelerated: left is subset of right"); $RL = $lc->is_RsubsetL(); ok(! $RL, "simple accelerated: right is not subset of left"); $RL = $lc->is_BsubsetA(); ok(! $RL, "simple accelerated: right is not subset of left"); $lc = List::Compare->new( '--accelerated', \@a0, \@a1 ); $LR = $lc->is_LsubsetR(); ok($LR, "simple accelerated long: left is subset of right"); $LR = $lc->is_AsubsetB(); ok($LR, "simple accelerated long: left is subset of right"); $RL = $lc->is_RsubsetL(); ok(! $RL, "simple accelerated long: right is not subset of left"); $RL = $lc->is_BsubsetA(); ok(! $RL, "simple accelerated long: right is not subset of left"); $lc = List::Compare->new( { lists => [ \@a0, \@a1 ], accelerated => 1 } ); $LR = $lc->is_LsubsetR(); ok($LR, "lists: left is subset of right"); $LR = $lc->is_AsubsetB(); ok($LR, "lists: left is subset of right"); $RL = $lc->is_RsubsetL(); ok(! $RL, "lists: right is not subset of left"); $RL = $lc->is_BsubsetA(); ok(! $RL, "lists: right is not subset of left"); $lc = List::Compare->new( \@a0, \@a1, \@a2 ); $LR = $lc->is_LsubsetR(); ok($LR, "multiple: left is subset of right"); $LR = $lc->is_LsubsetR(0,1); ok($LR, "multiple: left is subset of right"); $LR = $lc->is_LsubsetR(1,2); ok($LR, "multiple: left is subset of right"); $LR = $lc->is_LsubsetR(0,2); ok($LR, "multiple: left is subset of right"); $LR = $lc->is_AsubsetB(); ok($LR, "multiple: left is subset of right"); $LR = $lc->is_AsubsetB(0,1); ok($LR, "multiple: left is subset of right"); $LR = $lc->is_AsubsetB(1,2); ok($LR, "multiple: left is subset of right"); $LR = $lc->is_AsubsetB(0,2); ok($LR, "multiple: left is subset of right");
Subject: 50_lcf_subset.t
Download 50_lcf_subset.t
text/x-perl 1.9k
# perl #$Id$ # 50_lcf_subset.t use strict; use Test::More qw(no_plan); # tests => 51; use List::Compare::Functional qw(is_LsubsetR is_RsubsetL); my @a0 = ( qw| alpha | ); my @a1 = ( qw| alpha beta | ); my @a2 = ( qw| alpha beta gamma | ); my ($LR, $RL); $LR = is_LsubsetR( [ \@a0, \@a1 ] ); ok($LR, "simple: left is subset of right"); $RL = is_RsubsetL( [ \@a0, \@a1 ] ); ok(! $RL, "simple: right is not subset of left"); $LR = is_LsubsetR( [ \@a1, \@a0 ] ); ok(! $LR, "simple: left is not subset of right"); $RL = is_RsubsetL( [ \@a1, \@a0 ] ); ok($RL, "right is subset of left"); $LR = is_LsubsetR( { lists => [ \@a0, \@a1 ] } ); ok($LR, "hashref lists: left is subset of right"); $RL = is_RsubsetL( { lists => [ \@a0, \@a1 ] } ); ok(! $RL, "hashref lists: right is not subset of left"); $LR = is_LsubsetR( { lists => [ \@a1, \@a0 ] } ); ok(! $LR, "hashref lists: left is not subset of right"); $RL = is_RsubsetL( { lists => [ \@a1, \@a0 ] } ); ok($RL, "right is subset of left"); $LR = is_LsubsetR( [ \@a0, \@a1 ], [ 0,1 ] ); ok($LR, "2 indices arrayref: left is subset of right"); $LR = is_LsubsetR( [ \@a1, \@a0 ], [ 0,1 ] ); ok(! $LR, "2 indices arrayref: left is not subset of right"); $LR = is_LsubsetR( [ \@a0, \@a1, \@a2 ], [ 1,2 ] ); ok($LR, "3 indices arrayref: left is subset of right"); $LR = is_LsubsetR( [ \@a2, \@a1, \@a0 ], [ 1,2 ] ); ok(! $LR, "3 indices arrayref: left is not subset of right"); $LR = is_LsubsetR( { lists => [ \@a0, \@a1 ], pair => [ 0,1 ] } ); ok($LR, "lists pair 2 indices: left is subset of right"); $LR = is_LsubsetR( { lists => [ \@a1, \@a0 ], pair => [ 0,1 ] } ); ok(! $LR, "lists pair 2 indices: left is not subset of right"); $LR = is_LsubsetR( { lists => [ \@a0, \@a1, \@a2 ], pair => [ 1,2 ] } ); ok($LR, "lists pair 3 indices: left is subset of right"); $LR = is_LsubsetR( { lists => [ \@a2, \@a1, \@a0 ], pair => [ 1,2 ] } ); ok(! $LR, "lists pair 3 indices: left is not subset of right");
Subject: lcf_is_LsubsetR.v0.50.failures.txt
$ prove -vb t/50_lcf_subset.t t/50_lcf_subset.t .. not ok 1 - simple: left is subset of right ok 2 - simple: right is not subset of left ok 3 - simple: left is not subset of right ok 4 - right is subset of left not ok 5 - hashref lists: left is subset of right ok 6 - hashref lists: right is not subset of left ok 7 - hashref lists: left is not subset of right ok 8 - right is subset of left not ok 9 - 2 indices arrayref: left is subset of right ok 10 - 2 indices arrayref: left is not subset of right not ok 11 - 3 indices arrayref: left is subset of right # Failed test 'simple: left is subset of right' # at t/50_lcf_subset.t line 15. # Failed test 'hashref lists: left is subset of right' # at t/50_lcf_subset.t line 28. # Failed test '2 indices arrayref: left is subset of right' # at t/50_lcf_subset.t line 41. # Failed test '3 indices arrayref: left is subset of right' # at t/50_lcf_subset.t line 47. ok 12 - 3 indices arrayref: left is not subset of right not ok 13 - lists pair 2 indices: left is subset of right ok 14 - lists pair 2 indices: left is not subset of right not ok 15 - lists pair 3 indices: left is subset of right # Failed test 'lists pair 2 indices: left is subset of right' # at t/50_lcf_subset.t line 54. # Failed test 'lists pair 3 indices: left is subset of right' # at t/50_lcf_subset.t line 60. ok 16 - lists pair 3 indices: left is not subset of right 1..16 # Looks like you failed 6 tests of 16. Dubious, test returned 6 (wstat 1536, 0x600) Failed 6/16 subtests Test Summary Report ------------------- t/50_lcf_subset.t (Wstat: 1536 Tests: 16 Failed: 6) Failed tests: 1, 5, 9, 11, 13, 15 Non-zero exit status: 6 Files=1, Tests=16, 0 wallclock secs ( 0.01 usr 0.00 sys + 0.01 cusr 0.00 csys = 0.02 CPU) Result: FAIL
Download (untitled) / with headers
text/plain 516b
On Thu May 14 21:27:35 2015, JKEENAN wrote: Show quoted text
> When file 50_lcf_subset.t (attached) is placed in the 't/' > subdirectory and run against recently uploaded v0.50 of > List::Compare::Functional, test failures emerge as shown in > attachment. > > The object-oriented interface does not appear to be adversely > affected, as can be seen by running 49_lc_subset.t (also attached).
v0.51 has been uploaded to CPAN. It can also be obtained from http://thenceforward.net/perl/modules/List-Compare/List-Compare-0.51.tar.gz
The tests pass on the current CPAN version (0.52), this ticket can be closed.
Download (untitled) / with headers
text/plain 392b
On Tue Jun 02 18:05:39 2015, PSCUST wrote: Show quoted text
> The tests pass on the current CPAN version (0.52), this ticket can be > closed.
Thanks for the reminder; marking ticket resolved. I am always eager to learn about how people use List-Compare (or any of my CPAN distributions). Should you choose to disclose that, please send me email at jkeenan at cpan dot org. Thank you very much. Jim Keenan


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.