Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
lxvm committed Feb 16, 2024
1 parent c86d196 commit ec85909
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/interface_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ end
prob = IntegralProblem(integrands[i], lb, ub)
@info "Alg = $(nameof(typeof(alg))), Integrand = $i, Dimension = $dim, Output Dimension = $nout"
sol = solve(prob, alg, reltol = reltol, abstol = abstol)
@test sol.alg == alg
@test sol.uexact_sol[i](dim, nout, lb, ub) rtol=1e-2
end
end
Expand All @@ -119,6 +120,7 @@ end
end
@info "Alg = $(nameof(typeof(alg))), Integrand = $i, Dimension = $dim, Output Dimension = $nout"
sol = solve(prob, alg, reltol = reltol, abstol = abstol)
@test sol.alg == alg
@test sol.uexact_sol[i](dim, nout, lb, ub) rtol=1e-2
end
end
Expand All @@ -137,6 +139,7 @@ end
end
@info "Alg = $(nameof(typeof(alg))), Integrand = $i, Dimension = $dim, Output Dimension = $nout"
sol = solve(prob, alg, reltol = reltol, abstol = abstol)
@test sol.alg == alg
if sol.u isa Number
@test sol.uexact_sol[i](dim, nout, lb, ub) rtol=1e-2
else
Expand All @@ -158,6 +161,7 @@ end
end
@info "Alg = $(nameof(typeof(alg))), Integrand = $i, Dimension = $dim, Output Dimension = $nout"
sol = solve(prob, alg, reltol = reltol, abstol = abstol)
@test sol.alg == alg
@test sol.u[1]exact_sol[i](dim, nout, lb, ub) rtol=1e-2
end
end
Expand All @@ -175,6 +179,7 @@ end
end
@info "Alg = $(nameof(typeof(alg))), Integrand = $i, Dimension = $dim, Output Dimension = $nout"
sol = solve(prob, alg, reltol = reltol, abstol = abstol)
@test sol.alg == alg
if sol.u isa Number
@test sol.uexact_sol[i](dim, nout, lb, ub) rtol=1e-2
else
Expand All @@ -198,6 +203,7 @@ end
end
@info "Alg = $(nameof(typeof(alg))), Integrand = $i, Dimension = $dim, Output Dimension = $nout"
sol = solve(prob, alg, reltol = reltol, abstol = abstol)
@test sol.alg == alg
if sol.u isa Number
@test sol.uexact_sol[i](dim, nout, lb, ub) rtol=1e-2
else
Expand All @@ -222,6 +228,7 @@ end
end
@info "Alg = $(nameof(typeof(alg))), Integrand = $i, Dimension = $dim, Output Dimension = $nout"
sol = solve(prob, alg, reltol = reltol, abstol = abstol)
@test sol.alg == alg
if nout == 1
@test sol.u[1]exact_sol_v[i](dim, nout, lb, ub)[1] rtol=1e-2
else
Expand All @@ -245,6 +252,7 @@ end
nout = nout)
@info "Alg = $(nameof(typeof(alg))), Integrand = $i, Dimension = $dim, Output Dimension = $nout"
sol = solve(prob, alg, reltol = reltol, abstol = abstol)
@test sol.alg == alg
if nout == 1
@test sol.u[1]exact_sol_v[i](dim, nout, lb, ub)[1] rtol=1e-2
else
Expand All @@ -270,6 +278,7 @@ end
end
@info "Alg = $(nameof(typeof(alg))), Integrand = $i, Dimension = $dim, Output Dimension = $nout"
sol = solve(prob, alg, reltol = reltol, abstol = abstol)
@test sol.alg == alg
if nout == 1
@test sol.u[1]exact_sol_v[i](dim, nout, lb, ub)[1] rtol=1e-2
else
Expand All @@ -293,6 +302,7 @@ end
end
@info "Alg = $(nameof(typeof(alg))), Integrand = $i, Dimension = $dim, Output Dimension = $nout"
sol = solve(prob, alg, reltol = reltol, abstol = abstol)
@test sol.alg == alg
@test sol.uexact_sol_v[i](dim, nout, lb, ub) rtol=1e-2
end
end
Expand All @@ -313,6 +323,7 @@ end
end
@info "Alg = $(nameof(typeof(alg))), Integrand = $i, Dimension = $dim, Output Dimension = $nout"
sol = solve(prob, alg, reltol = reltol, abstol = abstol)
@test sol.alg == alg
@test sol.uexact_sol_v[i](dim, nout, lb, ub) rtol=1e-2
end
end
Expand All @@ -333,6 +344,7 @@ end
end
@info "Alg = $(nameof(typeof(alg))), Integrand = $i, Dimension = $dim, Output Dimension = $nout"
sol = solve(prob, alg, reltol = reltol, abstol = abstol)
@test sol.alg == alg
@test sol.uexact_sol_v[i](dim, nout, lb, ub) rtol=1e-2
end
end
Expand Down

0 comments on commit ec85909

Please sign in to comment.