use strict;
use warnings;
-use Test::More tests => 5 + 16 + 12;
+use Test::More tests => 5 + 24 + 12;
use LaTeX::TikZ;
::is(prototype('T'), '', 'LaTeX::TikZ::TestAPI2::T is actually a constant');
}
-my @methods = qw/
+my @methods = qw<
+ formatter functor
raw
- path seq
- point line polyline closed_polyline rectangle circle arc
+ union path seq chain join
+ point line polyline closed_polyline rectangle circle arc arrow
raw_mod
clip layer
- width color fill
-/;
+ scale width color fill pattern
+>;
for (@methods) {
ok(Tikz->can($_), "Tikz evaluates to something that ->can($_)");
for my $name (undef, ':)') {
eval {
- LaTeX::TikZ::Interface->import(
+ LaTeX::TikZ::Interface->register(
$name => sub { },
);
};
}
eval {
- LaTeX::TikZ::Interface->import(
+ LaTeX::TikZ::Interface->register(
'raw' => sub { },
);
};
for my $code (undef, [ ]) {
eval {
- LaTeX::TikZ::Interface->import(
+ LaTeX::TikZ::Interface->register(
'foo' => $code,
);
};
}
eval {
- LaTeX::TikZ::Interface->import(
+ LaTeX::TikZ::Interface->register(
'foo' => sub { @_ },
);
};
is_deeply [ Tikz->foo('hello') ], [ Tikz, 'hello' ], 'Tikz->foo works';
eval {
- LaTeX::TikZ::Interface->import(
+ LaTeX::TikZ::Interface->register(
'bar' => sub { @_ },
'baz' => undef,
);