Skip to content

Commit a93ea8e

Browse files
committed
Remove tests for Index
1 parent d2d4f7a commit a93ea8e

File tree

7 files changed

+13
-14
lines changed

7 files changed

+13
-14
lines changed

S02-types/WHICH.t

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ my @normal = <
4242
Hash
4343
HashIter
4444
HyperWhatever
45-
Index
4645
IO::ArgFiles
4746
IO::Handle
4847
IO::Path

S32-list/first-index.t

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,28 @@ my @list = (1 ... 10);
99

1010
{
1111
my $result = first-index { $^a % 2 }, |@list;
12-
ok($result ~~ Index, "first-index() returns an Index");
12+
ok($result ~~ Int, "first-index() returns an Int");
1313
is($result, 0, "returned value by first-index() is correct");
1414
}
1515

1616
{
1717
my $result = first-index { $^a % 2 }, 1, 2, 3, 4, 5, 6, 7, 8;
18-
ok($result ~~ Index, "first-index() returns an Index");
18+
ok($result ~~ Int, "first-index() returns an Int");
1919
is($result, 0, "returned value by first-index() is correct");
2020
}
2121

2222

2323
{
2424
my $result = @list.first-index( { $^a == 4} );
25-
ok($result ~~ Index, "method form of first-index returns an Index");
25+
ok($result ~~ Int, "method form of first-index returns an Int");
2626
is($result, 3, "method form of first-index returns the expected item");
2727
}
2828

2929
#?rakudo skip "adverbial block RT #124758"
3030
#?niecza skip 'No value for parameter Mu $filter in CORE Any.first'
3131
{
3232
my $result = @list.first-index():{ $^a == 4 };
33-
ok($result ~~ Index, "first-index():<block> returns an Index");
33+
ok($result ~~ Int, "first-index():<block> returns an Int");
3434
is($result, 3, "first-index() returned the expected value");
3535
}
3636

S32-list/grep-index.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plan 40;
77

88
my @list = (1 .. 10);
99

10-
is grep-index( { ($_ % 2) }, @list ).grep(Index), (0,2,4,6,8).list.item, 'do we get Indexes';
10+
is grep-index( { ($_ % 2) }, @list ).grep(Int), (0,2,4,6,8).list.item, 'do we get Ints';
1111
is grep-index( { ($_ % 2) }, @list ), (0,2,4,6,8).list.item,
1212
'simple direct test of sub';
1313
is @list.grep-index( { ($_ % 2) } ), (0,2,4,6,8).list.item,

S32-list/last-index.t

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,28 @@ my @list = (1 ... 10);
99

1010
{
1111
my $result = last-index { $^a % 2 }, |@list;
12-
ok($result ~~ Index, "last-index() returns an Index");
12+
ok($result ~~ Int, "last-index() returns an Int");
1313
is($result, 8, "returned value by last-index() is correct");
1414
}
1515

1616
{
1717
my $result = last-index { $^a % 2 }, 1, 2, 3, 4, 5, 6, 7, 8;
18-
ok($result ~~ Index, "last-index() returns an Index");
18+
ok($result ~~ Int, "last-index() returns an Int");
1919
is($result, 6, "returned value by last-index() is correct");
2020
}
2121

2222

2323
{
2424
my $result = @list.last-index( { $^a == 4} );
25-
ok($result ~~ Index, "method form of last-index returns an Index");
25+
ok($result ~~ Int, "method form of last-index returns an Int");
2626
is($result, 3, "method form of last-index returns the expected item");
2727
}
2828

2929
#?rakudo skip "adverbial block RT #124754"
3030
#?niecza skip 'No value for parameter Mu $filter in CORE Any.first'
3131
{
3232
my $result = @list.last-index():{ $^a == 4 };
33-
ok($result ~~ Index, "last-index():<block> returns an Index");
33+
ok($result ~~ Int, "last-index():<block> returns an Int");
3434
is($result, 3, "last-index() returned the expected value");
3535
}
3636

S32-str/index.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use Test;
66
plan 36;
77

88
# Type of return value
9-
isa-ok('abc'.index('b'), Index);
9+
isa-ok('abc'.index('b'), Int);
1010
isa-ok('abc'.index('d'), Nil);
1111

1212
# Simple - with just a single char

S32-str/indices.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ use Test;
66
plan 24;
77

88
# Type of return value
9-
isa-ok 'abc'.indices('b')[0], Index;
9+
isa-ok 'abc'.indices('b')[0], Int;
1010
isa-ok 'abc'.indices('d'), Parcel;
1111
is 'abc'.indices('d').elems, 0, "method did not find anything";
12-
isa-ok indices('abc','b')[0], Index;
12+
isa-ok indices('abc','b')[0], Int;
1313
isa-ok indices('abc','d'), Parcel;
1414
is indices('abc','d').elems, 0, "sub did not find anything";
1515

S32-str/rindex.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use Test;
66
plan 35;
77

88
# Type of return value
9-
isa-ok('abc'.rindex('b'), Index);
9+
isa-ok('abc'.rindex('b'), Int);
1010
isa-ok('abc'.rindex('d'), Nil);
1111

1212
# Simple - with just a single char

0 commit comments

Comments
 (0)