diff --git a/S02-types/parcel.t b/S02-types/parcel.t index 7991434116..abc54c22a9 100644 --- a/S02-types/parcel.t +++ b/S02-types/parcel.t @@ -30,8 +30,8 @@ is ?(1,2,3), True, 'non-empty Parcel is True'; lives_ok { <5 7 8>[] }, 'can zen slice a Parcel'; -# RT #115282 -is (;).elems, 0, '(;) parses, and is empty'; +# WAS: RT #115282, modified for lolly brannch +is $(;).elems, 0, '$(;) parses, and is empty'; # .rotate { diff --git a/S03-feeds/basic.t b/S03-feeds/basic.t index 1bea7fb1e3..9394bd6ac5 100644 --- a/S03-feeds/basic.t +++ b/S03-feeds/basic.t @@ -13,7 +13,7 @@ Tests for the feed operators =end pod -plan 25; +plan 24; { my @a = (1, 2); @@ -114,13 +114,6 @@ plan 25; is(@(*), , 'two feeds to whatever as array'); } -# stacked feeds -#?rakudo todo '* feeds' -{ - ('a' .. 'd'; 0 .. 3) ==> my @data; - is(@(@data), , 'two stacked feeds'); -} - # feed and Inf #?nieza skip "unhandled exception { diff --git a/S04-blocks-and-statements/let.t b/S04-blocks-and-statements/let.t index 2875656e77..373a1d0633 100644 --- a/S04-blocks-and-statements/let.t +++ b/S04-blocks-and-statements/let.t @@ -11,7 +11,7 @@ plan 12; { my $a = 42; { - is((let $a = 23; $a), 23, "let() changed the variable (1)"); + is($(let $a = 23; $a), 23, "let() changed the variable (1)"); 1; } is $a, 23, "let() should not restore the variable, as our block exited succesfully (1)"; @@ -22,7 +22,7 @@ plan 12; { my $a = 42; { - is((let $a = 23; $a), 23, "let() changed the variable (1)"); + is($(let $a = 23; $a), 23, "let() changed the variable (1)"); Mu; } is $a, 42, "let() should restore the variable, as our block failed"; @@ -34,7 +34,7 @@ plan 12; my $a = 42; my $get_a = { $a }; { - is((let $a = 23; $a), 23, "let() changed the variable (2-1)"); + is($(let $a = 23; $a), 23, "let() changed the variable (2-1)"); is $get_a(), 23, "let() changed the variable (2-2)"; 1; } @@ -46,7 +46,7 @@ plan 12; { my $a = 42; try { - is((let $a = 23; $a), 23, "let() changed the variable in a try block"); + is($(let $a = 23; $a), 23, "let() changed the variable in a try block"); die 57; }; #?rakudo.jvm todo 'let restore on exception, RT #121647' @@ -56,7 +56,7 @@ plan 12; { my @array = (0, 1, 2); { - is((let @array[1] = 42; @array[1]), 42, "let() changed our array element"); + is($(let @array[1] = 42; @array[1]), 42, "let() changed our array element"); Mu; } is @array[1], 1, "let() restored our array element"; diff --git a/S04-blocks-and-statements/temp.t b/S04-blocks-and-statements/temp.t index 5ab69634ec..92505323c3 100755 --- a/S04-blocks-and-statements/temp.t +++ b/S04-blocks-and-statements/temp.t @@ -8,7 +8,7 @@ plan 36; { my $a = 42; { - is((temp $a = 23; $a), 23, "temp() changed the variable (1)"); + is($(temp $a = 23; $a), 23, "temp() changed the variable (1)"); } is $a, 42, "temp() restored the variable (1)"; } @@ -19,7 +19,7 @@ plan 36; my $a = 42; my $get_a = { $a }; { - is((temp $a = 23; $a), 23, "temp() changed the variable (2-1)"); + is($(temp $a = 23; $a), 23, "temp() changed the variable (2-1)"); is $get_a(), 23, "temp() changed the variable (2-2)"; } is $a, 42, "temp() restored the variable (2)"; @@ -30,14 +30,14 @@ plan 36; my $a = 42; my $get_a = { $a }; { - ok((temp $a = 23; $a =:= $get_a()), "temp() shouldn't change the variable containers"); + ok($(temp $a = 23; $a =:= $get_a()), "temp() shouldn't change the variable containers"); } } { our $pkgvar = 42; { - is((temp $pkgvar = 'not 42'; $pkgvar), 'not 42', "temp() changed the package variable (3-1)"); + is($(temp $pkgvar = 'not 42'; $pkgvar), 'not 42', "temp() changed the package variable (3-1)"); } is $pkgvar, 42, "temp() restored the package variable (3-2)"; } @@ -47,7 +47,7 @@ plan 36; { my $a = 42; try { - is((temp $a = 23; $a), 23, "temp() changed the variable in a try block"); + is($(temp $a = 23; $a), 23, "temp() changed the variable in a try block"); die 57; }; is $a, 42, "temp() restored the variable, the block was exited using an exception"; @@ -156,7 +156,7 @@ EVAL(' #?rakudo todo 'TEMP phasers NYI' { - is((temp $a; $was_in_own_temp_handler), 1, ".TEMP method was executed on temporization"); + is($(temp $a; $was_in_own_temp_handler), 1, ".TEMP method was executed on temporization"); } #?rakudo todo 'TEMP phasers NYI' is $was_in_own_temp_handler, 2, ".TEMP method was executed on restoration"; diff --git a/S04-statements/terminator.t b/S04-statements/terminator.t index 1271ce74eb..0087a42b4c 100644 --- a/S04-statements/terminator.t +++ b/S04-statements/terminator.t @@ -37,11 +37,11 @@ eval_dies_ok('my $x = ', 'incomplete expression'); my $z = []; EVAL q' - $z = [ do { 1 } - + 2 ]; + $z = do { 1 } + + 2; '; - is($z[0], 2, 'auto-curly applies inside array composer'); + is($z, 1, 'auto-curly applies inside array composer'); } eval_dies_ok "42 if 23\nis 50; 1", diff --git a/S06-operator-overloading/sub.t b/S06-operator-overloading/sub.t index 95d96f4aea..a6d0033f53 100644 --- a/S06-operator-overloading/sub.t +++ b/S06-operator-overloading/sub.t @@ -176,7 +176,7 @@ Testing operator overloading subroutines #?niecza todo { my proto infix:<;> ($a, $b) { $a + $b } - is (3 ; 2), 5 # XXX correct? + is $(3 ; 2), 5 # XXX correct? } # [NOTE] diff --git a/integration/99problems-01-to-10.t b/integration/99problems-01-to-10.t index ecc783212f..de4265b00c 100644 --- a/integration/99problems-01-to-10.t +++ b/integration/99problems-01-to-10.t @@ -193,10 +193,12 @@ plan 22; sub group2 (*@array is copy) { gather while @array { take [ - my $h = @array[0]; - gather while @array and $h eq @array[0] { - take shift @array; - } + gather { + my $h = @array[0]; + while @array and $h eq @array[0] { + take shift @array; + } + } ]; } } diff --git a/integration/advent2009-day05.t b/integration/advent2009-day05.t index 0d08a6ab09..c25b7938e7 100644 --- a/integration/advent2009-day05.t +++ b/integration/advent2009-day05.t @@ -21,15 +21,15 @@ ok ([<=] @a), 'All elements of list are numerically sorted'; nok ([<=] @b), 'Not all elements of list are numerically sorted'; is ([min] @a, @b), 2, 'Find the smallest element of two lists'; is (@a »+« @b), [18, 18, 18, 18], 'Hyper operator - pairwise addition'; -is (@a_copy = @a; @a_copy»++; @a_copy), [3, 5, 7, 9], 'Hyper operator - increment all elements in a list'; +is $(@a_copy = @a; @a_copy»++; @a_copy), [3, 5, 7, 9], 'Hyper operator - increment all elements in a list'; is (@a »min« @b), [2, 4, 6, 8], 'Hyper operator - finding minimum elements'; is (@a »*» 3.5), [7, 14, 21, 28], 'Hyper operator - multiply each element by 3.5'; is (@a »*» $a »+» $b), [10, 18, 26, 34], 'Hyper operator - multiple each element by $a and add $b'; -is (1 «/« @a;), [1/2, 1/4, 1/6, 1/8], 'Hyper operator - invert all elements'; +is 1 «/« @a, [1/2, 1/4, 1/6, 1/8], 'Hyper operator - invert all elements'; is ((@a »~» ', ') »~« @b), ["2, 16", "4, 14", "6, 12", "8, 10"], 'Hyper operator - concat @a and @b'; is ([+] ( @b »**» 2)), 696, 'Hyper operator - sum of squares'; -is ($a1 = $a; $a1 += 5;), ($a2 = $a; $a2 = $a2 + 5), 'In-place += operator is a meta form of + with = suffix'; -is ($a1 = $a; $a1 //= 7;), ($a2 = $a; $a2 = $a2 // 7), 'In-place //= operator is a meta form of // with = suffix'; -is ($a1 = $a; $a1 min= $b;), ($a2 = $a; $a2 = $a2 min $b), 'In-place min= operator is a meta form of min with = suffix'; +is $($a1 = $a; $a1 += 5;), $($a2 = $a; $a2 = $a2 + 5), 'In-place += operator is a meta form of + with = suffix'; +is $($a1 = $a; $a1 //= 7;), $($a2 = $a; $a2 = $a2 // 7), 'In-place //= operator is a meta form of // with = suffix'; +is $($a1 = $a; $a1 min= $b;), $($a2 = $a; $a2 = $a2 min $b), 'In-place min= operator is a meta form of min with = suffix'; done; diff --git a/integration/advent2009-day06.t b/integration/advent2009-day06.t index adb759eaff..d8352d81e9 100644 --- a/integration/advent2009-day06.t +++ b/integration/advent2009-day06.t @@ -21,7 +21,7 @@ throws_like {@a >>+<< @b}, X::HyperOp::NonDWIM, is (@a >>+>> 2), [3, 4, 5, 6], 'Single scalars extend to the right'; is (3 <<+<< @a), [4, 5, 6, 7], 'Single scalars extend to the left'; is (~<<@a), ["1", "2", "3", "4"], 'Hyperoperator with prefix operator'; -is (@a-copy = @a; @a-copy>>++; @a-copy), [2, 3, 4, 5], 'Hyperoperator with postfix operator'; +is $(@a-copy = @a; @a-copy>>++; @a-copy), [2, 3, 4, 5], 'Hyperoperator with postfix operator'; for @pi Z @pi-sin -> $elem, $elem-sin { is_approx $elem.sin, $elem-sin, 'Hyperoperator used to call .sin on each list element'; } @@ -29,5 +29,5 @@ is ((-1, 0, 3, 42)>>.Str), ["-1", "0", "3", "42"], 'Hyperoperator used to call . #?niecza todo { - is (@a-copy = @a; @a-copy >>/=>> 2; @a-copy), [1/2, 2/2, 3/2, 4/2], 'In-place operators work'; + is $(@a-copy = @a; @a-copy >>/=>> 4; @a-copy), [1/2, 2/2, 3/2, 4/2], 'In-place operators work'; }