Skip to content

Commit bc14b79

Browse files
committed
Fudge/Unfudge for latest [].exists|delete fixes
1 parent f728c56 commit bc14b79

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

S02-names-vars/varnames.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ eval_dies_ok 'my $fo:o::b:ar = "bla"', "var names can't have colons in their nam
2020
#?pugs skip "Can't modify constant item: VObject"
2121
{
2222
class MyMatch {
23-
method postcircumfix:<[ ]>($x) {
23+
method at_pos($x) {
2424
"foo$x";
2525
}
2626
}

S03-binding/arrays.t

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,13 @@ plan 47;
3939
@array.delete(1);
4040
# $var unchanged, but assigning to $var doesn't modify @array any
4141
# longer; similarily, changing @array[1] doesn't modify $var now
42-
#?rakudo todo 'array binding, delete'
4342
#?niecza todo 'array binding, delete'
4443
is $var, "e", "binding of array elements works with .delete (2)";
4544
is ~@array, "a c", "binding of array elements works with .delete (3)";
4645

4746
$var = "f";
4847
@array[1] = "g";
4948
#?niecza todo 'array binding, delete'
50-
#?rakudo todo 'array binding, delete'
5149
is $var, "f", "binding of array elements works with .delete (4)";
5250
is @array[1], "g", "binding of array elements works with .delete (5)";
5351
}

S13-overloading/operators.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ plan 4;
2323
#?pugs todo
2424
{
2525
class A does Associative {
26-
method postcircumfix:<{ }>(*@ix) {
26+
method at_key(*@ix) {
2727
return @ix
2828
}
2929
};

S32-array/delete.t

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,28 @@ sub make-string(@a) {
2323
"deletion of an array element returned the right thing";
2424
is make-string(@array), "a b Any() d", "deletion of an array element";
2525

26-
is ~@array.delete(0, 3), "a d",
26+
is ~@array.delete(3), "d",
2727
"deletion of array elements returned the right things";
2828
#?pugs todo
29-
is make-string(@array), "Any() b", "deletion of array elements (1)";
29+
is make-string(@array), "a b", "deletion of array elements (1)";
3030
#?pugs todo
3131
is +@array, 2, "deletion of array elements (2)";
3232
}
3333

3434
# W/ negative indices:
35+
#?rakudo skip ":delete NYI, but will be shortly"
3536
{
3637
my @array = <a b c d>;
3738
#?pugs todo
38-
is ~@array.delete(*-2), "c",
39+
is ~@array[*-2]:delete, "c",
3940
"deletion of array element accessed by an negative index returned the right thing";
4041
# @array is now ("a", "b", Any, "d") ==> double spaces
4142
#?pugs todo
4243
is make-string(@array), "a b Any() d", "deletion of an array element accessed by an negative index (1)";
4344
is +@array, 4, "deletion of an array element accessed by an negative index (2)";
4445

4546
#?pugs todo
46-
is ~@array.delete(*-1), "d",
47+
is ~@array[*-1]:delete, "d",
4748
"deletion of last array element returned the right thing";
4849
# @array is now ("a", "b")
4950
#?pugs todo
@@ -54,9 +55,10 @@ sub make-string(@a) {
5455

5556
# W/ multiple positive and negative indices:
5657
#?pugs todo
58+
#?rakudo skip ":delete NYI, but will be shortly"
5759
{
5860
my @array = <a b c d e f>;
59-
is ~@array.delete(2, *-3, *-1), "c d f",
61+
is ~@array[2, *-3, *-1]:delete, "c d f",
6062
"deletion of array elements accessed by positive and negative indices returned right things";
6163
# @array is now ("a", "b", Any, Any, "e") ==> double spaces
6264
is make-string(@array), "a b Any() Any() e",
@@ -67,11 +69,11 @@ sub make-string(@a) {
6769

6870
# Results taken from Perl 5
6971
#?niecza todo "Not sure if this test is correct or not"
70-
#?rakudo todo "Not sure if this test is correct or not"
7172
#?pugs todo "Not sure if this test is correct or not"
73+
#?rakudo skip ":delete NYI, but will be shortly"
7274
{
7375
my @array = <a b c>;
74-
is ~@array.delete(2, *-1), "c b",
76+
is ~@array[2, *-1]:delete, "c b",
7577
"deletion of the same array element accessed by different indices returned right things";
7678
is ~@array, "a",
7779
"deletion of the same array element accessed by different indices (1)";
@@ -90,9 +92,10 @@ sub make-string(@a) {
9092
}
9193

9294
# W/ one range of positive indices
95+
#?rakudo skip ":delete NYI, but will be shortly"
9396
{
9497
my @array = <a b c d e f>;
95-
is ~@array.delete(2..4), "c d e",
98+
is ~@array[2..4]:delete, "c d e",
9699
"deletion of array elements accessed by a range of positives indices returned right things";
97100
# @array is now ("a", "b", Any, Any, Any, "f") ==> 4 spaces
98101
is make-string(@array), "a b Any() Any() Any() f",
@@ -101,9 +104,10 @@ sub make-string(@a) {
101104
"deletion of array elements accessed by a range of positive indices (2)";
102105
}
103106

107+
#?rakudo skip ":delete NYI, but will be shortly"
104108
{
105109
my @array = <a b c d e f>;
106-
is ~@array.delete(2^..4), "d e",
110+
is ~@array[2^..4]:delete, "d e",
107111
"deletion of array elements accessed by a range of positives indices returned right things (2)";
108112
# @array is now ("a", "b", "c", Any, Any, "f") ==> 4 spaces
109113
is make-string(@array), "a b c Any() Any() f",

0 commit comments

Comments
 (0)