Skip to content

Commit

Permalink
Some more spectest changes/fixes related to autoviv.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Apr 20, 2012
1 parent 546456c commit 7b837e8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion S02-types/catch_type_cast_mismatch.t
Expand Up @@ -22,7 +22,7 @@ dies_ok { $ref[0] }, 'Hash !~~ Positional';
{
$ref = [ 42 ];
isa_ok($ref, Array);
dies_ok( { $ref<0> }, 'Accessing an array as a hash dies');
ok( $ref<0> ~~ Failure, 'Accessing an array as a hash fails');
}

# Also test that scalars give up their container types - this time a
Expand Down
18 changes: 10 additions & 8 deletions S12-attributes/delegation.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 66;
plan 65;

=begin desc
Expand Down Expand Up @@ -197,13 +197,15 @@ class PairTest {
is $h.Str, ~{a => 5}, 'delegation of .Str and .push to hash';
}

{
class TypePseudoHash { has %!data handles Hash }
my $h = TypePseudoHash.new;
$h<a> = 'c';
$h<b> = 'd';
is $h<a b>.join('|'), 'c|d', 'can do handles + type object (1)';
}
# This test cannot work; autoviv requires Hash-like methods in
# Any, which means that the 'handles Hash' fallback never occurs.
#{
# class TypePseudoHash { has %!data handles Hash }
# my $h = TypePseudoHash.new;
# $h<a> = 'c';
# $h<b> = 'd';
# is $h<a b>.join('|'), 'c|d', 'can do handles + type object (1)';
#}

#?pugs skip "Can't modify constant item: VUndef"
{
Expand Down

0 comments on commit 7b837e8

Please sign in to comment.