Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Toss tests that rely on being able to bind to a method return value.

  • Loading branch information...
commit cc486395ae6813288d88761a3cb30d0b6a9a06b0 1 parent fc26150
Jonathan Worthington jnthn authored

Showing 1 changed file with 1 addition and 45 deletions. Show diff stats Hide diff stats

  1. +1 45 S02-builtin_data_types/pair.t
46 S02-builtin_data_types/pair.t
@@ -2,7 +2,7 @@ use v6;
2 2
3 3 use Test;
4 4
5   -plan 117;
  5 +plan 97;
6 6
7 7 # L<S02/Mutable types/A single key-to-value association>
8 8 # basic Pair
@@ -271,50 +271,6 @@ Note, "non-chaining binary" was later renamed to "structural infix".
271 271 is $val, "val", "setting .value does not change the original var";
272 272 }
273 273
274   -{
275   - my ($key, $val) = <key val>;
276   - my $pair = ($key => $val);
277   -
278   - #?pugs 2 todo 'bug'
279   - lives_ok { $pair.key := "KEY" }, "binding .key does not die";
280   - is $pair.key, "KEY", "binding .key actually changes the key";
281   - is $key, "key", "binding .key does not change the original var";
282   - dies_ok { $pair.key = 42 }, "the .key was really bound"; # (can't modify constant)
283   -
284   - #?pugs 2 todo 'bug'
285   - lives_ok { $pair.value := "VAL" }, "binding .value does not die";
286   - is $pair.value, "VAL", "binding .value actually changes the value";
287   - is $val, "val", "binding .value does not change the original var";
288   - dies_ok { $pair.value = 42 }, "the .value was really bound"; # (can't modify constant)
289   -}
290   -
291   -{
292   - my ($key, $val) = <key val>;
293   - my $pair = (abc => "def");
294   -
295   - #?pugs 2 todo 'bug'
296   - lives_ok { $pair.key := $key }, "binding .key does not die";
297   - is $pair.key, "key", "binding .key actually changes the key";
298   - $key = "KEY";
299   - is $key, "KEY", "binding .key to a var works (1)";
300   - #?pugs 5 todo 'bug'
301   - is $pair.key, "KEY", "binding .key to a var works (2)";
302   - $pair.key = "new";
303   - is $key, "new", "binding .key to a var works (3)";
304   - is $pair.key, "new", "binding .key to a var works (4)";
305   -
306   - lives_ok { $pair.value := $val }, "binding .value does not die";
307   - is $pair.value, "val", "binding .value actually changes the value";
308   - $val = "VAL";
309   - is $val, "VAL", "binding .value to a var works (1)";
310   - #?pugs 3 todo 'bug'
311   - is $pair.value, "VAL", "binding .value to a var works (2)";
312   - $pair.value = "new";
313   - is $val, "new", "binding .value to a var works (3)";
314   - is $pair.value, "new", "binding .value to a var works (4)";
315   -}
316   -
317   -
318 274 ## These tests really belong in a different test file -- probably
319 275 ## something in S06. --pmichaud
320 276 # L<S06/Named arguments/In other words :$when is shorthand for :when($when)>

0 comments on commit cc48639

Please sign in to comment.
Something went wrong with that request. Please try again.