From: Vincent Pit Date: Thu, 28 Aug 2008 17:45:57 +0000 (+0200) Subject: Renumber t/11-pkg.t tests X-Git-Tag: v0.03~6 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=49879973c101332e3eedf8e2abb66bae5d3eaac5;p=perl%2Fmodules%2Fsubs-auto.git Renumber t/11-pkg.t tests --- diff --git a/t/11-pkg.t b/t/11-pkg.t index e97b704..f84e31d 100644 --- a/t/11-pkg.t +++ b/t/11-pkg.t @@ -10,31 +10,31 @@ our $foo; { use subs::auto in => 'subs::auto::Test::Pkg'; - eval { subs::auto::Test::Pkg::foo 5 }; - is($@, '', 'compiled to subs::auto::Test::Pkg::foo(5)'); - is($foo, 10, 'subs::auto::Test::Pkg::foo was really called'); + eval { subs::auto::Test::Pkg::foo 1 }; + is($@, '', 'compiled to subs::auto::Test::Pkg::foo(1)'); + is($foo, 3, 'subs::auto::Test::Pkg::foo was really called'); { use subs::auto; - eval { foo 3 }; - is($@, '', 'compiled to foo(3)'); - is($foo, 3, 'main::foo was really called'); + eval { foo 2 }; + is($@, '', 'compiled to foo(2)'); + is($foo, 4, 'main::foo was really called'); - eval { subs::auto::Test::Pkg::foo 4 }; - is($@, '', 'compiled to subs::auto::Test::Pkg::foo(4)'); - is($foo, 8, 'subs::auto::Test::Pkg::foo was really called'); + eval { subs::auto::Test::Pkg::foo 3 }; + is($@, '', 'compiled to subs::auto::Test::Pkg::foo(3)'); + is($foo, 9, 'subs::auto::Test::Pkg::foo was really called'); { package subs::auto::Test::Pkg; - eval { foo 7 }; - Test::More::is($@, '', 'compiled to foo(7)'); - Test::More::is($foo, 14, 'subs::auto::Test::Pkg::foo was really called'); + eval { foo 4 }; + Test::More::is($@, '', 'compiled to foo(4)'); + Test::More::is($foo, 12, 'subs::auto::Test::Pkg::foo was really called'); - eval { main::foo 9 }; - Test::More::is($@, '', 'compiled to main::foo(9)'); - Test::More::is($foo, 9, 'main::foo was really called'); + eval { main::foo 5 }; + Test::More::is($@, '', 'compiled to main::foo(5)'); + Test::More::is($foo, 10, 'main::foo was really called'); } } } @@ -44,17 +44,17 @@ our $foo; use subs::auto; - eval { foo 8 }; - Test::More::is($@, '', 'compiled to foo(8)'); - Test::More::is($foo, 16, 'subs::auto::Test::Pkg::foo was really called'); + eval { foo 6 }; + Test::More::is($@, '', 'compiled to foo(6)'); + Test::More::is($foo, 18, 'subs::auto::Test::Pkg::foo was really called'); } { use subs::auto in => '::'; - eval { foo 11 }; - is($@, '', 'compiled to foo(11)'); - is($foo, 11, 'main::foo was really called'); + eval { foo 7 }; + is($@, '', 'compiled to foo(7)'); + is($foo, 14, 'main::foo was really called'); } { @@ -65,16 +65,16 @@ our $foo; { package subs::auto::Test::Pkg; - eval { foo 13 }; - Test::More::is($@, '', 'compiled to foo(13)'); - Test::More::is($foo, 26, 'subs::auto::Test::Pkg::foo was really called'); + eval { foo 8 }; + Test::More::is($@, '', 'compiled to foo(8)'); + Test::More::is($foo, 24, 'subs::auto::Test::Pkg::foo was really called'); } } sub foo { - $main::foo = $_[0]; + $main::foo = 2 * $_[0]; } sub subs::auto::Test::Pkg::foo { - $main::foo = 2 * $_[0]; + $main::foo = 3 * $_[0]; }