X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F11-point.t;h=0ceee6c52ea8b0a49670a5a30358b534066fd21e;hb=b212ec02c4010c5200e7741d432397bfede7ca50;hp=7bd64d6568312043ad9aa15fe5beea22d07a40f0;hpb=30f5ed56f488e23570b3ed768de0614c99dcd70e;p=perl%2Fmodules%2FLaTeX-TikZ.git diff --git a/t/11-point.t b/t/11-point.t index 7bd64d6..0ceee6c 100644 --- a/t/11-point.t +++ b/t/11-point.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 6 + 2 * 6; +use Test::More tests => 8 + 2 * 8; use Math::Complex; @@ -87,3 +87,29 @@ is $@, '', 'creating a point from an array ref doesn\'t croak'; check $p, 'a point from an array ref', <<'RES'; \draw (-3cm,2cm) ; RES + +$p = eval { + Tikz->point( + [1,-1], + label => 'foo', + ); +}; +is $@, '', 'creating a labeled point from an array ref doesn\'t croak'; + +check $p, 'a labeled point', <<'RES'; +\draw (1cm,-1cm) [fill] circle (0.4pt) node[scale=0.20,above] {foo} ; +RES + +$p = eval { + Tikz->point( + [2,-2], + label => 'bar', + pos => 'below right', + ); +}; +is $@, '', + 'creating a labeled positioned point from an array ref doesn\'t croak'; + +check $p, 'a labeled positioned point', <<'RES'; +\draw (2cm,-2cm) [fill] circle (0.4pt) node[scale=0.20,below right] {bar} ; +RES