Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Toss tests that rely on being able to bind to a method return value.
  • Loading branch information
jnthn committed Aug 3, 2011
1 parent fc26150 commit cc48639
Showing 1 changed file with 1 addition and 45 deletions.
46 changes: 1 addition & 45 deletions S02-builtin_data_types/pair.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 117;
plan 97;

# L<S02/Mutable types/A single key-to-value association>
# basic Pair
Expand Down Expand Up @@ -271,50 +271,6 @@ Note, "non-chaining binary" was later renamed to "structural infix".
is $val, "val", "setting .value does not change the original var";
}

{
my ($key, $val) = <key val>;
my $pair = ($key => $val);

#?pugs 2 todo 'bug'
lives_ok { $pair.key := "KEY" }, "binding .key does not die";
is $pair.key, "KEY", "binding .key actually changes the key";
is $key, "key", "binding .key does not change the original var";
dies_ok { $pair.key = 42 }, "the .key was really bound"; # (can't modify constant)

#?pugs 2 todo 'bug'
lives_ok { $pair.value := "VAL" }, "binding .value does not die";
is $pair.value, "VAL", "binding .value actually changes the value";
is $val, "val", "binding .value does not change the original var";
dies_ok { $pair.value = 42 }, "the .value was really bound"; # (can't modify constant)
}

{
my ($key, $val) = <key val>;
my $pair = (abc => "def");

#?pugs 2 todo 'bug'
lives_ok { $pair.key := $key }, "binding .key does not die";
is $pair.key, "key", "binding .key actually changes the key";
$key = "KEY";
is $key, "KEY", "binding .key to a var works (1)";
#?pugs 5 todo 'bug'
is $pair.key, "KEY", "binding .key to a var works (2)";
$pair.key = "new";
is $key, "new", "binding .key to a var works (3)";
is $pair.key, "new", "binding .key to a var works (4)";

lives_ok { $pair.value := $val }, "binding .value does not die";
is $pair.value, "val", "binding .value actually changes the value";
$val = "VAL";
is $val, "VAL", "binding .value to a var works (1)";
#?pugs 3 todo 'bug'
is $pair.value, "VAL", "binding .value to a var works (2)";
$pair.value = "new";
is $val, "new", "binding .value to a var works (3)";
is $pair.value, "new", "binding .value to a var works (4)";
}


## 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)>
Expand Down

0 comments on commit cc48639

Please sign in to comment.