X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F031_method_modifiers.t;h=73c915a539949ad3f8541a032ca901103eac84ea;hb=96ceced87583646c1396bba4fdfa92d0b6c37058;hp=583d1fa8cac03a00534c60211874e2a842e21b42;hpb=a4258ffd7a0a2bb8db5f01936068185d4f879b1a;p=gitmo%2FClass-MOP.git diff --git a/t/031_method_modifiers.t b/t/031_method_modifiers.t index 583d1fa..73c915a 100644 --- a/t/031_method_modifiers.t +++ b/t/031_method_modifiers.t @@ -92,15 +92,15 @@ BEGIN { } '... added the before modifier okay'; lives_ok { - $wrapped->add_around_modifier(sub { push @tracelog => 'around 3'; $_[0]->(); }); + $wrapped->add_around_modifier(sub { push @tracelog => 'around 1'; $_[0]->(); }); $wrapped->add_around_modifier(sub { push @tracelog => 'around 2'; $_[0]->(); }); - $wrapped->add_around_modifier(sub { push @tracelog => 'around 1'; $_[0]->(); }); + $wrapped->add_around_modifier(sub { push @tracelog => 'around 3'; $_[0]->(); }); } '... added the around modifier okay'; lives_ok { - $wrapped->add_after_modifier(sub { push @tracelog => 'after 3' }); + $wrapped->add_after_modifier(sub { push @tracelog => 'after 1' }); $wrapped->add_after_modifier(sub { push @tracelog => 'after 2' }); - $wrapped->add_after_modifier(sub { push @tracelog => 'after 1' }); + $wrapped->add_after_modifier(sub { push @tracelog => 'after 3' }); } '... added the after modifier okay'; $wrapped->(); @@ -108,9 +108,9 @@ BEGIN { \@tracelog, [ 'before 3', 'before 2', 'before 1', # last-in-first-out order - 'around 1', 'around 2', 'around 3', # last-in-first-out order + 'around 3', 'around 2', 'around 1', # last-in-first-out order 'primary', - 'after 3', 'after 2', 'after 1', # first-in-first-out order + 'after 1', 'after 2', 'after 3', # first-in-first-out order ], '... got the right tracelog from all our before/around/after methods'); }