diff options
author | mertz | 2004-09-17 11:51:10 +0000 |
---|---|---|
committer | mertz | 2004-09-17 11:51:10 +0000 |
commit | b6d3d6562b2735a1f766c4ceb55a254551dd4df2 (patch) | |
tree | 3b28f7a9b35043c534f39a034114b02e75e6c160 /Perl/t/Bbox.t | |
parent | b1caa18f3f9d70407ecd1e1cb5a00dfe1294234c (diff) | |
download | tkzinc-b6d3d6562b2735a1f766c4ceb55a254551dd4df2.zip tkzinc-b6d3d6562b2735a1f766c4ceb55a254551dd4df2.tar.gz tkzinc-b6d3d6562b2735a1f766c4ceb55a254551dd4df2.tar.bz2 tkzinc-b6d3d6562b2735a1f766c4ceb55a254551dd4df2.tar.xz |
correcting tests so that testing labels / fields wo labelformat of corresponding to not-defined fields in the mlabelformat DO WORK with 3.30
Diffstat (limited to 'Perl/t/Bbox.t')
-rw-r--r-- | Perl/t/Bbox.t | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/Perl/t/Bbox.t b/Perl/t/Bbox.t index dcb0e1a..226186b 100644 --- a/Perl/t/Bbox.t +++ b/Perl/t/Bbox.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # -# $Id: Bbox.t,v 1.5 2004-09-09 07:52:44 lecoanet Exp $ +# $Id: Bbox.t,v 1.6 2004-09-17 11:51:10 mertz Exp $ # Author: Christophe Mertz # @@ -112,26 +112,25 @@ ok(&similarFlatArray ([$zinc->bbox($txt4)], ### testing bbox of fields or labels of track/waypoint and tabular items my $track = $zinc->add('track', 1, 4, -position => [56, 78]); -#print "bbox1=(", join(',', $zinc->bbox(-label, $track)),")\n"; +# print "bbox11=(", $bbox,")\n"; - is_deeply([ $zinc->bbox(-label, $track) ], - [ ], - "bbox of a track label without labelformat"); +is($zinc->bbox(-label, $track), (), + "bbox of a track label without labelformat is ()"); -#print "bbox=(", join(',', $zinc->bbox(-field, 2, $track)),")\n"; -is_deeply ([ $zinc->bbox(-field, 2, $track) ], - [ ], - "bbox of a track field without labelformat"); +my $bbox = $zinc->bbox(-field, 0, $track); +#print "bbox22=(", $bbox,")\n"; + +is( $bbox, undef, "bbox of a track field without labelformat is undef"); $zinc->itemconfigure($track, -labelformat => 'x20x18+0+0'); #print "bbox=(", join(',', $zinc->bbox(-label, $track)),")\n"; +$bbox = eval { $zinc->bbox(-field, 4, $track) } ; +#print "bbox=(", $bbox,")\n"; -#print "bbox=(", join(',', $zinc->bbox(-field, 4, $track)),")\n"; -is_deeply ([ $zinc->bbox(-field, 4, $track) ], - [ ], - "bbox of an empty track field"); +is( $bbox, (), + "bbox of a track field which field is out of bound is undef"); my $wpt = $zinc->add('waypoint', 1, 0, -position => [561, 781]); #print "wpt bbox=(", join(',', $zinc->bbox($wpt)),")\n"; |