Skip to content

Commit

Permalink
Properly initialize X::AdHoc objects used in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
skids committed Jul 13, 2015
1 parent c77a7c8 commit 7a10d1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions t/sum.t
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ my @d;
#? rakudo skip 'feed through a slurpy arity function'
#@d <== $h.partials <== (2,3);
#is @d.join(""), "3942", "partials inserts values in a feed"
is $h.partials(4,5,Failure.new(X::AdHoc.new()),6).map({.WHAT.gist}), '(Foo3) (Foo3) (Failure)', "partials stops iterating on Failure (Partial,Cooked).";
is $h.partials(4,5,Failure.new(X::AdHoc.new(:payload<foo>)),6).map({.WHAT.gist}), '(Foo3) (Foo3) (Failure)', "partials stops iterating on Failure (Partial,Cooked).";

class Foo3r does Sum::Partial does Sum does Sum::Marshal::Raw {
has $.accum is rw = 0;
Expand All @@ -157,7 +157,7 @@ class Foo3r does Sum::Partial does Sum does Sum::Marshal::Raw {
my Foo3r $hr .= new();

# XXX do some tests of laziness of partials method
is $hr.partials(4,5,Failure.new(X::AdHoc.new()),6).map({.WHAT.gist}), '(Foo3r) (Foo3r) (Failure)', "partials stops iterating on Failure (Partial,Raw).";
is $hr.partials(4,5,Failure.new(X::AdHoc.new(:payload<foo>)),6).map({.WHAT.gist}), '(Foo3r) (Foo3r) (Failure)', "partials stops iterating on Failure (Partial,Raw).";

lives-ok {
class Foo4 does Sum::Partial does Sum does Sum::Marshal::Method[:atype(Str) :method<ords>] {
Expand Down

0 comments on commit 7a10d1e

Please sign in to comment.