Skip to content

Commit

Permalink
[v6.d REVIEW] Remove useless Any:U.*pend/*shift/push/pop tests
Browse files Browse the repository at this point in the history
I think 2016-Zoffix thought the Any:U candidates from Rakduo's
core will get called and those will call the custom methods
in these custom classes, but that's a brainfart.

Orig: e42733254
  • Loading branch information
zoffixznet committed Jul 15, 2018
1 parent 5658270 commit 7d49a8d
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions S29-any/deg-trans.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 34;
plan 18;

# Degenerate and Transformative Any methods
# -----
Expand All @@ -18,18 +18,6 @@ plan 34;
is-deeply Any.antipairs, (), 'Any:U.antipairs returns empty list';

my @exp = 1, 2, "foo";
my class AnyU {
method append (*@got) { is-deeply @got, @exp, 'append called' ; 1; }
method prepend (*@got) { is-deeply @got, @exp, 'prepend called'; 1; }
method unshift (*@got) { is-deeply @got, @exp, 'unshift called'; 1; }
method push (*@got) { is-deeply @got, @exp, 'push called' ; 1; }
}
my class AnyUPos is AnyU does Positional {}

for <append prepend unshift push> -> $m {
is AnyU."$m"( @exp), 1, ".$m on custom Any:U";
is AnyUPos."$m"(@exp), 1, ".$m on custom Any:U does Positonal";
}

is-deeply $ .unshift(@exp), [@exp,], '.unshift on Any:U';
is-deeply $ .prepend(@exp), @exp, '.prepend on Any:U';
Expand Down

0 comments on commit 7d49a8d

Please sign in to comment.