Skip to content

Commit

Permalink
Adapt test for zen slice with unknown adverb
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Oct 14, 2015
1 parent 08e8c9a commit 29f5477
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion S32-array/adverbs.t
Expand Up @@ -437,8 +437,9 @@ for $@n, Any, $@s, Str -> @a, $T {
is @a[]:p($ok), (0=>"a",1=>"b",2=>"c",3=>"d"), "$n zen: :p";
is @a[]:!p, (0=>"a",1=>"b",2=>"c",3=>"d"), "$n zen: :!p";
is @a[]:p($no), (0=>"a",1=>"b",2=>"c",3=>"d"), "$n zen: :p(\$no)";
is @a[]:foo, @a, "$n zen:foo value";

throws-like '@a[]:foo', X::Adverb::Slice,
:what(@a.name), :unexpected<foo>, :type<[]>;
throws-like '@a[]:k:v', X::Adverb::Slice,
:what(@a.name), :nogo(<k v>);
throws-like '@a[]:kv:p:zip:zop', X::Adverb::Slice,
Expand Down
3 changes: 2 additions & 1 deletion S32-hash/adverbs.t
Expand Up @@ -403,8 +403,9 @@ for $%a, Any, $%i, Int, $%c, Any, $%j, Int -> %h, $T {
is (%h{}:p($ok)).sort(*.key), (:1a,:2b,:3c,:4d), "$n zen: :p";
is (%h{}:!p).sort(*.key), (:1a,:2b,:3c,:4d), "$n zen: :!p";
is (%h{}:p($no)).sort(*.key), (:1a,:2b,:3c,:4d), "$n zen: :p(\$no)";
is %h{}:foo, %h, "$n zen:foo value";

throws-like '%h{}:foo', X::Adverb::Slice,
:what(%h.name), :unexpected<foo>, :type<{}>;
throws-like '%h{}:k:v', X::Adverb::Slice,
:what(%h.name), :nogo(<k v>);
throws-like '%h{}:kv:p:zip:zop', X::Adverb::Slice,
Expand Down

0 comments on commit 29f5477

Please sign in to comment.