Skip to content

Commit 9abe4b2

Browse files
committed
Test nqp::existspos with array elements containing nqp::null
1 parent 2199a7f commit 9abe4b2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

t/nqp/059-nqpop.t

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Test nqp::op pseudo-functions.
44

5-
plan(330);
5+
plan(331);
66

77
ok( nqp::add_i(5,2) == 7, 'nqp::add_i');
88
ok( nqp::sub_i(5,2) == 3, 'nqp::sub_i');
@@ -232,6 +232,8 @@ ok(!nqp::existspos(@arr, -2), 'existspos with missing pos');
232232
ok(!nqp::existspos(@arr, -100), 'existspos with absurd values');
233233
@arr[1] := NQPMu;
234234
ok(nqp::existspos(@arr, 1), 'existspos with still existing pos');
235+
@arr[1] := nqp::null;
236+
ok(!nqp::existspos(@arr, 1), 'existspos is 0 for array elements containing null');
235237

236238
sub test_splice_with_return() {
237239
my @children := [1, 2, 3];

0 commit comments

Comments
 (0)