Skip to content

Commit 2c03cf0

Browse files
committed
test noise reset
1 parent faaba52 commit 2c03cf0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/noise_type_test.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ end
5151
prob = SDEProblem(f,g,ones(2),(0.0,1.0),noise_rate_prototype=sprand(2,4,1.0))
5252

5353
sol = solve(prob,EM(),dt=1/1000)
54-
5554
@test length(sol.W[1]) == 4
5655

56+
sol2 = solve(prob,EM(),dt=1/1000)
57+
@test sol.W.curt sol2.W.curt last(tspan)
58+
5759
ff = (u,p,t) -> exp(t)
5860
W = NoiseFunction(0.0,ff)
5961
drift(u,p,t) = u
@@ -63,3 +65,6 @@ tspan = (0.0,1.0)
6365
u0 = 0.0
6466
prob = SDEProblem(drift,vol,u0,(0.0,1.0), noise=W)
6567
sol = solve(prob,EM(),dt=0.1)
68+
@test sol.W.curt last(tspan)
69+
sol2 = solve(prob,EM(),dt=0.1)
70+
@test sol2.W.curt last(tspan)

0 commit comments

Comments
 (0)