Skip to content

Commit

Permalink
Add tests for #3469
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Feb 10, 2020
1 parent cfe2cdc commit 2132019
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions t/09-moar/00-misc.t
Expand Up @@ -2,9 +2,10 @@ use lib <t/packages/>;
use Test;
use Test::Helpers;

plan 2;
plan 4;

{ # https://github.com/rakudo/rakudo/issues/1534
# https://github.com/rakudo/rakudo/issues/1534
{
(temp %*ENV)<MVM_SPESH_BLOCKING MVM_SPESH_NODELAY> = 1, 1;
is-run use Test; use Test; print "pass", :out<pass>,
'no SPESH crashes with duplicate `use Test`';
Expand All @@ -13,4 +14,18 @@ plan 2;
lives-ok { class C { }; await start { for ^10_0000 { C.^set_name('B') } } xx 4 },
'No SEGV when many threads try to change the debug type name';

# https://github.com/rakudo/rakudo/issues/3469
{
use nqp;
nqp::srand(1);
my $first := nqp::rand_I(100,Int);
nqp::srand(1);
is nqp::rand_I(100,Int), $first, 'does srand produce same rand_I values';

nqp::srand(1);
$first := nqp::rand_n(100e0);
nqp::srand(1);
is nqp::rand_n(100e0), $first, 'does srand produce same rand_n values';
}

# vim: expandtab shiftwidth=4 ft=perl6

0 comments on commit 2132019

Please sign in to comment.