Skip to content

Commit

Permalink
Fudge for niecza.
Browse files Browse the repository at this point in the history
  • Loading branch information
colomon committed Dec 19, 2011
1 parent 21e85ed commit 9872f1f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions S02-types/pair.t
Expand Up @@ -13,6 +13,7 @@ isa_ok($pair, Pair);
# get key and value from the pair as many ways as possible

#?rakudo 2 skip 'method($invocant:) syntax missing'
#?niecza 2 skip 'Invocant handling is NYI'
is(key($pair:), 'foo', 'got the right key($pair:)');
is(value($pair:), 'bar', 'got the right value($pair:)');

Expand Down Expand Up @@ -146,6 +147,7 @@ sub test3 (%h){
for %h.pairs -> $pair {
isa_ok($pair,Pair);
isa_ok($pair[0], Pair, 'sub test3: $pair[0] is $pair');
#?niecza skip "Failure NYI"
ok $pair[1] ~~ Failure, 'sub test3: $pair[1] is failure';
}
}
Expand Down Expand Up @@ -264,17 +266,21 @@ Note, "non-chaining binary" was later renamed to "structural infix".
#?pugs 2 todo 'bug'
lives_ok { $pair.key = "KEY" }, "setting .key does not die";
is $pair.key, "KEY", "setting .key actually changes the key";
#?niecza todo "setting .key changes original val!"
is $key, "key", "setting .key does not change the original var";

#?pugs 2 todo 'bug'
lives_ok { $pair.value = "VAL" }, "setting .value does not die";
is $pair.value, "VAL", "setting .value actually changes the value";
#?niecza todo "setting .key changes original val!"
is $val, "val", "setting .value does not change the original var";
}

## These tests really belong in a different test file -- probably
## something in S06. --pmichaud
# L<S06/Named arguments/In other words :$when is shorthand for :when($when)>
#
#?niecza skip "eqv NYI for Pair"
{
my $item = 'bar';
my $pair = (:$item);
Expand All @@ -289,6 +295,7 @@ Note, "non-chaining binary" was later renamed to "structural infix".
ok($pair eqv (hash => %hash), ':%foo syntax works');
}

#?niecza skip "eqv NYI for Pair"
{
my sub code {return 42}
$pair = (:&code);
Expand Down
1 change: 1 addition & 0 deletions S05-capture/caps.t
Expand Up @@ -13,6 +13,7 @@ sub ca(@x) {
}

ok 'a b c d' ~~ /(.*)/, 'basic sanity';
#?niecza 2 skip "Positional NYI"
ok $/.caps ~~ Positional, '$/.caps returns something Positional';
#?rakudo todo 'return type of .chunks'
isa_ok $/.chunks ~~ Positional, '$/.chunks returns something Positional';
Expand Down

0 comments on commit 9872f1f

Please sign in to comment.