Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add todo test for typecheck failure
Somehow somewhere in the throw-like internals, we get a different
typecheck failure than the one we expect  :-(
  • Loading branch information
lizmat committed Jul 10, 2015
1 parent cfc0897 commit d6fe98b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions S32-array/splice.t
Expand Up @@ -9,7 +9,7 @@ This test tests the C<splice> builtin
=end description

plan (2 * 44) + 3 + 1 + 1;
plan (2*44) + (1*1) + 3 + 1 + 1;

sub splice-ok(\ret, \ret_exp, \rem, \rem_exp, Str $comment) {
subtest {
Expand All @@ -27,7 +27,6 @@ my Int @Int;

#for $@Any, Array, $@int, array[int], $@Int, Array[Int] -> @a, $T {
for $@Any, Array, $@Int, Array[Int] -> @a, $T {
#for $@Any, Array -> @a, $T {

sub submeth-ok(\values,\params,\return,\remain,$comment){
subtest {
Expand Down Expand Up @@ -108,6 +107,16 @@ for $@Any, Array, $@Int, Array[Int] -> @a, $T {
}
}

#for $@int, array[int], $@Int, Array[Int] -> @a, $T {
for $@Int, Array[Int] -> @a, $T {
@a = ^10;
#?rakudo todo "somehow the test causes different typecheck error"
throws-like 'splice @a,0,0,"foo"', X::TypeCheck::Splice,
:action<splice>,
:got(Str),
:expected($T);
}

# splice4 gets "CxtItem _" or "CxtArray _" instead of "CxtSlurpy _"
# Test the identity of calls to splice:
{
Expand Down

0 comments on commit d6fe98b

Please sign in to comment.