X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FLaTeX-TikZ.git;a=blobdiff_plain;f=t%2F12-geo.t;h=7ce5d643a2414d94b3d43658c4c37614ea5c1c07;hp=afbc1e703717d51dbf22f0d551f4889b97f638b9;hb=92f8566cc72a8bfded5c55589030ddab5f215bd6;hpb=17bd99ecff97751a8323f7f89a97bacb7cd29ec2 diff --git a/t/12-geo.t b/t/12-geo.t index afbc1e7..7ce5d64 100644 --- a/t/12-geo.t +++ b/t/12-geo.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => (14 + 2 * 5) + 2 * (11 + 2 * 3); +use Test::More tests => (16 + 2 * 5) + 2 * (13 + 2 * 3); use Math::Complex; @@ -60,6 +60,26 @@ check $l, 'a line from two Tikz points', <<'RES'; \draw (-1cm,2cm) -- (3cm,-4cm) ; RES +# Arrow + +my $ar = eval { + Tikz->arrow($o, 1); +}; +is $@, '', 'creating an arrow from two points doesn\'t croak'; + +check $ar, 'an arrow from two points', <<'RES'; +\draw [->] (0cm,0cm) -- (1cm,0cm) ; +RES + +$ar = eval { + Tikz->arrow(2, dir => -i()); +}; +is $@, '', 'creating an arrow from a point and a direction doesn\'t croak'; + +check $ar, 'an arrow from a point and a direction', <<'RES'; +\draw [->] (2cm,0cm) -- (2cm,-1cm) ; +RES + # Polyline my $w = Tikz->point(3, -4);