From 2d63150c35f01336655336a3bea5da91aa41cf3b Mon Sep 17 00:00:00 2001 From: mertz Date: Thu, 11 Sep 2003 10:03:05 +0000 Subject: 2 new tests... --- Perl/t/test-methods.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Perl/t') diff --git a/Perl/t/test-methods.pl b/Perl/t/test-methods.pl index 88a0d10..9becf7e 100644 --- a/Perl/t/test-methods.pl +++ b/Perl/t/test-methods.pl @@ -210,8 +210,11 @@ sub test_bboxes { [100,200,300,400], "a simple rectangle with linewidth of 5"); # Rectangular curves + &bbox_must_be($zinc->add('curve', 1, [ [100,200], [300,200], [300,400], [100,400] ], + -linewidth =>0), + [100,200,300,400], "a rectangular curve of linewidth => 0"); &bbox_must_be($zinc->add('curve', 1, [ [100,200], [300,200], [300,400], [100,400] ]), - [100,200,300,400], "a rectangular curve"); + [100,200,300,400], "a rectangular curve of linewidth => 1"); &bbox_must_be($zinc->add('curve', 1, [ [100,200], [300,200], [300,400], [100,400] ], -linewidth => 2), [100,200,300,400], "a rectangular curve of linewidth => 2"); @@ -222,6 +225,10 @@ sub test_bboxes { -linewidth => 5), [100,200,300,400], "a rectangular curve"); + # triangular curves (with a sharp angle) + &bbox_must_be($zinc->add('curve', 1, [ [0,0], [100,0], [0,10] ]), + [0,0,100,10], "a triangular curve of linewidth => 1)"); + # Arcs &bbox_must_be($zinc->add('arc', 1, [100,200,300,400]), [100,200,300,400], "an arc"); @@ -229,6 +236,7 @@ sub test_bboxes { [100,200,300,400], "an arc of linewidth => 2"); &bbox_must_be($zinc->add('arc', 1, [100,200,300,400], -linewidth => 3), [100,200,300,400], "an arc of linewidth => 3"); + &log (0, "#---- End of test_bboxes -----\n"); } # end of test_bboxes -- cgit v1.1