X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F01-api.t;h=4ccbc96155b8da09b030e59708412d822da94521;hb=92f8566cc72a8bfded5c55589030ddab5f215bd6;hp=6bcada79c7e08b35966eee0235540e88aa923ee8;hpb=22f1a59ec62500605cf907a4117faf25160ad92c;p=perl%2Fmodules%2FLaTeX-TikZ.git diff --git a/t/01-api.t b/t/01-api.t index 6bcada7..4ccbc96 100644 --- a/t/01-api.t +++ b/t/01-api.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 5 + 13 + 12; +use Test::More tests => 5 + 17 + 12; use LaTeX::TikZ; @@ -31,7 +31,7 @@ is(prototype('Tikz'), '', 'main::Tikz is actually a constant'); my @methods = qw/ raw path seq - point line rectangle circle + point line polyline closed_polyline rectangle circle arc arrow raw_mod clip layer width color fill @@ -41,11 +41,11 @@ for (@methods) { ok(Tikz->can($_), "Tikz evaluates to something that ->can($_)"); } -require LaTeX::TikZ::API; +require LaTeX::TikZ::Interface; for my $name (undef, ':)') { eval { - LaTeX::TikZ::API->import( + LaTeX::TikZ::Interface->import( $name => sub { }, ); }; @@ -53,7 +53,7 @@ for my $name (undef, ':)') { } eval { - LaTeX::TikZ::API->import( + LaTeX::TikZ::Interface->import( 'raw' => sub { }, ); }; @@ -61,7 +61,7 @@ like $@, qr/^'raw' is already defined/, 'already defined'; for my $code (undef, [ ]) { eval { - LaTeX::TikZ::API->import( + LaTeX::TikZ::Interface->import( 'foo' => $code, ); }; @@ -69,7 +69,7 @@ for my $code (undef, [ ]) { } eval { - LaTeX::TikZ::API->import( + LaTeX::TikZ::Interface->import( 'foo' => sub { @_ }, ); }; @@ -78,7 +78,7 @@ ok(Tikz->can('foo'), 'Tikz evaluates to something that ->can(foo)'); is_deeply [ Tikz->foo('hello') ], [ Tikz, 'hello' ], 'Tikz->foo works'; eval { - LaTeX::TikZ::API->import( + LaTeX::TikZ::Interface->import( 'bar' => sub { @_ }, 'baz' => undef, );