We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f63eeb commit a19e355Copy full SHA for a19e355
t/nqp/108-vmhash.t
@@ -1,4 +1,4 @@
1
-plan(54);
+plan(55);
2
3
my $backend := nqp::getcomp('nqp').backend.name;
4
@@ -234,3 +234,16 @@ todo('Exceptions for iterators NYI on js', 2)
234
if $backend eq 'js';
235
ok($msg ne "", 'iterator throws after end');
236
is($msg, 'Iteration past end of iterator', 'iterator throws correct exception after end');
237
+
238
+$msg := "";
239
+try {
240
+ my $h := nqp::hash("a", 42);
241
+ my $i := nqp::iterator($h);
242
+ nqp::deletekey($h, "a");
243
+ nqp::shift($i);
244
+ CATCH {
245
+ nqp::getmessage($_);
246
+ }
247
+}
248
249
+ok($msg eq "", 'No SEGV on a misused hash iterator');
0 commit comments