Skip to content

Commit 05b38b7

Browse files
committed
added tests
1 parent f8a09ad commit 05b38b7

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using OrdinaryDiffEq, StochasticDiffEq, SteadyStateDiffEq, RecursiveArrayTools, Test
2+
3+
function f!(du,u,p,t)
4+
du[1] = p[1] + p[2]*u[1]
5+
du[2] = p[3]*u[1] + p[4]*u[2]
6+
end
7+
u0 = zeros(2)
8+
p = [2.0,-2.0,1.0,-4.0]
9+
10+
probODE = ODEProblem(f!,u0,(0.0,10.0),p)
11+
probSS = SteadyStateProblem(f!,u0,p)
12+
13+
solODE = concrete_solve(probODE,Tsit5(), abstol=1e-14,reltol=1e-14)
14+
solSS = concrete_solve(probSS,DynamicSS(Rodas5()))
15+
16+
@test solSS.u solODE.u[end] rtol = 1e-8
17+
@test length(fieldnames(typeof(solODE))) == 2
18+
@test length(fieldnames(typeof(solSS))) == 1

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ if !is_APPVEYOR && GROUP == "Downstream"
4646
@time @safetestset "PSOS and Energy Conservation Event Detection" begin include("downstream/psos_and_energy_conservation.jl") end
4747
@time @safetestset "DE stats" begin include("downstream/destats_tests.jl") end
4848
@time @safetestset "DEDataArray" begin include("downstream/data_array_regression_tests.jl") end
49+
@time @safetestset "Concrete_solve Tests" begin include("downstream/concrete_solve_tests.jl") end
4950
end
5051

5152
if !is_APPVEYOR && GROUP == "GPU"

0 commit comments

Comments
 (0)