@@ -627,7 +627,7 @@ guardseed() do
627
627
m = MersenneTwister (0 )
628
628
@test Random. seed! () === g
629
629
@test Random. seed! (rand (UInt)) === g
630
- @test Random. seed! (rand (UInt32, rand (1 : 10 ))) === g
630
+ @test Random. seed! (rand (UInt32, rand (1 : 8 ))) === g
631
631
@test Random. seed! (m) === m
632
632
@test Random. seed! (m, rand (UInt)) === m
633
633
@test Random. seed! (m, rand (UInt32, rand (1 : 10 ))) === m
@@ -751,28 +751,26 @@ end
751
751
@test Random. seed! (GLOBAL_RNG, 0 ) === LOCAL_RNG
752
752
@test Random. seed! (GLOBAL_RNG) === LOCAL_RNG
753
753
754
- mt = MersenneTwister (1 )
755
- @test copy! (mt, GLOBAL_RNG) === mt
756
- @test mt == LOCAL_RNG
757
- Random. seed! (mt, 2 )
758
- @test mt != LOCAL_RNG
759
- @test copy! (GLOBAL_RNG, mt) === LOCAL_RNG
760
- @test mt == LOCAL_RNG
761
- mt2 = copy (GLOBAL_RNG)
762
- @test mt2 isa typeof (LOCAL_RNG)
763
- @test mt2 != = LOCAL_RNG
764
- @test mt2 == LOCAL_RNG
754
+ xo = Xoshiro ()
755
+ @test copy! (xo, GLOBAL_RNG) === xo
756
+ @test xo == LOCAL_RNG
757
+ Random. seed! (xo, 2 )
758
+ @test xo != LOCAL_RNG
759
+ @test copy! (GLOBAL_RNG, xo) === LOCAL_RNG
760
+ @test xo == LOCAL_RNG
761
+ xo2 = copy (GLOBAL_RNG)
762
+ @test xo2 != = LOCAL_RNG
763
+ @test xo2 == LOCAL_RNG
765
764
766
765
for T in (Random. UInt52Raw{UInt64},
767
- Random. UInt2x52Raw{UInt128},
768
766
Random. UInt104Raw{UInt128},
769
767
Random. CloseOpen12_64)
770
768
x = Random. SamplerTrivial (T ())
771
- @test rand (GLOBAL_RNG, x) === rand (mt , x)
769
+ @test rand (GLOBAL_RNG, x) === rand (xo , x)
772
770
end
773
771
for T in (Int64, UInt64, Int128, UInt128, Bool, Int8, UInt8, Int16, UInt16, Int32, UInt32)
774
772
x = Random. SamplerType {T} ()
775
- @test rand (GLOBAL_RNG, x) === rand (mt , x)
773
+ @test rand (GLOBAL_RNG, x) === rand (xo , x)
776
774
end
777
775
778
776
A = fill (0.0 , 100 , 100 )
@@ -781,21 +779,21 @@ end
781
779
vB = view (B, :, :)
782
780
I1 = Random. SamplerTrivial (Random. CloseOpen01 {Float64} ())
783
781
I2 = Random. SamplerTrivial (Random. CloseOpen12 {Float64} ())
784
- @test rand! (GLOBAL_RNG, A, I1) === A == rand! (mt , B, I1) === B
782
+ @test rand! (GLOBAL_RNG, A, I1) === A == rand! (xo , B, I1) === B
785
783
B = fill! (B, 1.0 )
786
784
@test rand! (GLOBAL_RNG, vA, I1) === vA
787
- rand! (mt , vB, I1)
785
+ rand! (xo , vB, I1)
788
786
@test A == B
789
787
for T in (Float16, Float32)
790
788
B = fill! (B, 1.0 )
791
- @test rand! (GLOBAL_RNG, A, I2) === A == rand! (mt , B, I2) === B
789
+ @test rand! (GLOBAL_RNG, A, I2) === A == rand! (xo , B, I2) === B
792
790
B = fill! (B, 1.0 )
793
- @test rand! (GLOBAL_RNG, A, I1) === A == rand! (mt , B, I1) === B
791
+ @test rand! (GLOBAL_RNG, A, I1) === A == rand! (xo , B, I1) === B
794
792
end
795
793
for T in Base. BitInteger_types
796
794
x = Random. SamplerType {T} ()
797
795
B = fill! (B, 1.0 )
798
- @test rand! (GLOBAL_RNG, A, x) === A == rand! (mt , B, x) === B
796
+ @test rand! (GLOBAL_RNG, A, x) === A == rand! (xo , B, x) === B
799
797
end
800
798
# issue #33170
801
799
@test Sampler (GLOBAL_RNG, 2 : 4 , Val (1 )) isa SamplerRangeNDL
0 commit comments