Skip to content

Commit

Permalink
Bump NQP to get srand / rand_I fixes
Browse files Browse the repository at this point in the history
- MasterDuke++
- also re-enable and extend tests
- Fixes R#3469
  • Loading branch information
lizmat committed Feb 13, 2020
1 parent 19576d6 commit f95bf76
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions t/09-moar/00-misc.t
Expand Up @@ -2,7 +2,7 @@ use lib <t/packages/>;
use Test;
use Test::Helpers;

plan 4;
plan 6;

# https://github.com/rakudo/rakudo/issues/1534
{
Expand All @@ -18,15 +18,18 @@ lives-ok { class C { }; await start { for ^10_0000 { C.^set_name('B') } } xx 4 }
{
use nqp;
nqp::srand(1);
my $first := nqp::rand_I(100,Int);
my $first := nqp::rand_I(100,Int);
my $second := nqp::rand_I(100,Int);
nqp::srand(1);
pass "waiting for fix";
# is nqp::rand_I(100,Int), $first, 'does srand produce same rand_I values';
is nqp::rand_I(100,Int), $first, 'does srand produce same rand_I values 1';
is nqp::rand_I(100,Int), $second, 'does srand produce same rand_I values 2';

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

# vim: expandtab shiftwidth=4 ft=perl6
2 changes: 1 addition & 1 deletion tools/templates/NQP_REVISION
@@ -1 +1 @@
2020.01-20-g7d71103
2020.01-22-gf6eb0c214

0 comments on commit f95bf76

Please sign in to comment.