6 use Test::More tests => 8 + 2 * 8 + 2 * (1 + 2 * 3);
13 use LaTeX::TikZ::TestHelper;
15 using Tikz->formatter(
19 my $z = Math::Complex->make(1, 2);
24 is $@, '', 'creating a point from a Math::Complex object doesn\'t croak';
26 check $p, 'a point from a Math::Complex object', <<'RES';
33 is $@, '', 'creating a point from a Math::Complex constant object doesn\'t croak';
35 check $p, 'a point from a constant Math::Complex object', <<'RES';
42 is $@, '', 'creating a point from nothing doesn\'t croak';
44 check $p, 'a point from nothing', <<'RES';
51 is $@, '', 'creating a point from a numish constant doesn\'t croak';
53 check $p, 'a point from a numish constant', <<'RES';
60 is $@, '', 'creating a point from two numish constants doesn\'t croak';
62 check $p, 'a point from two numish constants', <<'RES';
69 is $@, '', 'creating a point from an array ref doesn\'t croak';
71 check $p, 'a point from an array ref', <<'RES';
81 is $@, '', 'creating a labeled point from an array ref doesn\'t croak';
83 check $p, 'a labeled point', <<'RES';
84 \draw (1cm,-1cm) [fill] circle (0.4pt) node[scale=0.20,above] {foo} ;
95 'creating a labeled positioned point from an array ref doesn\'t croak';
97 check $p, 'a labeled positioned point', <<'RES';
98 \draw (2cm,-2cm) [fill] circle (0.4pt) node[scale=0.20,below right] {bar} ;
103 Tikz->point([ 0, -1 ]),
108 is $@, '', 'creating a simple union path doesn\'t croak';
109 is_point_ok $union->begin, 0, -1, 'beginning of a simple union path';
110 is_point_ok $union->end, 9, 0, 'end of a simple union path';
114 Tikz->join('--' => 1, 2, 3),
116 Tikz->chain(5 => '--' => [ 6, 1 ]),
119 is $@, '', 'creating a complex union path doesn\'t croak';
120 is_point_ok $path->begin, 1, 0, 'beginning of a complex union path';
121 is_point_ok $path->end, 6, 1, 'end of a complex union path';