Skip to content

Commit 122f955

Browse files
committed
Make unit tests deterministic by seeding the RNG
1 parent b0c971b commit 122f955

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test/runtests.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
using StaticArrays
22
using Base.Test
33

4+
# We generate a lot of matrices using rand(), but unit tests should be
5+
# deterministic, so seed the RNG here.
6+
srand(42)
7+
48
include("testutil.jl")
59
include("SVector.jl")
610
include("MVector.jl")

test/triangular.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
srand()
2-
31
@testset "Triangular-matrix multiplication" begin
42
for n in (1, 2, 3, 4),
53
eltyA in (Float64, Complex128, Int),

0 commit comments

Comments
 (0)