Skip to content

Commit b3b2861

Browse files
committed
Add tests
1 parent 0df6a8b commit b3b2861

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

test/StochasticProcess.jl

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using RandomMatrices
2+
using Base.Test
3+
4+
srand(1)
5+
dx = 0.001
6+
7+
p = WhiteNoiseProcess(dx)
8+
@test start(p) == nothing
9+
next(p)
10+
@test done(p) == false
11+
12+
p = BrownianProcess(dx)
13+
@test start(p) == 0
14+
next(p, 0.0)
15+
@test done(p) == false
16+
17+
p = AiryProcess(dx, 2.0)
18+
S = start(p)
19+
@test S == fill(-2/dx^2, 1, 1)
20+
next(p, S)
21+
@test done(p) == false
22+

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ using Base.Test
44
srand(1)
55
include("FormalPowerSeries.jl")
66
include("Haar.jl")
7-
7+
include("StochasticProcess.jl")

0 commit comments

Comments
 (0)