From: <bru...@us...> - 2008-07-06 16:17:07
|
Revision: 856 http://panotools.svn.sourceforge.net/panotools/?rev=856&view=rev Author: brunopostle Date: 2008-07-06 09:17:15 -0700 (Sun, 06 Jul 2008) Log Message: ----------- tests for Duplicates(), Subset and Merge() Modified Paths: -------------- trunk/Panotools-Script/t/012.read-pto.t Modified: trunk/Panotools-Script/t/012.read-pto.t =================================================================== --- trunk/Panotools-Script/t/012.read-pto.t 2008-07-06 15:31:24 UTC (rev 855) +++ trunk/Panotools-Script/t/012.read-pto.t 2008-07-06 16:17:15 UTC (rev 856) @@ -26,3 +26,22 @@ ok ($p->Write ($tempfile), "script written to $tempfile"); } +is (scalar @{$p->Control}, 41, '41 control points'); + +my $dupes = $p->Duplicates; +is (scalar @{$dupes}, 1, '1 duplicate control point removed'); +is (scalar @{$p->Control}, 40, '40 control points remaining'); + +my $a = $p->Subset (1,2,3); +my $b = $p->Subset (0,1,3,4); + +is (scalar @{$a->Image}, 3, 'split 3 images'); +is (scalar @{$a->Control}, 19, '19 control points with 3 images'); + +is (scalar @{$b->Image}, 4, 'split 4 images'); +is (scalar @{$b->Control}, 21, '21 control points with 4 images'); + +$a->Merge ($b); +is (scalar @{$a->Image}, 5, 'merged 5 images'); +is (scalar @{$a->Control}, 40, 'merged 40 control points'); + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |