Skip to content

Commit

Permalink
Add an rtol for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeingold committed Sep 27, 2024
1 parent c0bdd97 commit 3178649
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/combinations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@

# Scalar integrand
sol = 2π * u"Ω"
@test integral(f, curve, GaussLegendre(100)) sol
@test integral(f, curve, GaussKronrod()) sol
@test integral(f, curve, HAdaptiveCubature()) sol
@test integral(f, curve, GaussLegendre(100))sol rtol=1e-3
@test integral(f, curve, GaussKronrod())sol rtol=1e-3
@test integral(f, curve, HAdaptiveCubature())sol rtol=1e-3

# Vector integrand
vsol = fill(sol, 3)
@test integral(fv, curve, GaussLegendre(100)) vsol
@test integral(fv, curve, GaussKronrod()) vsol
@test integral(fv, curve, HAdaptiveCubature()) vsol
@test integral(fv, curve, GaussLegendre(100))vsol rtol=1e-3
@test integral(fv, curve, GaussKronrod())vsol rtol=1e-3
@test integral(fv, curve, HAdaptiveCubature())vsol rtol=1e-3

# Integral aliases
@test lineintegral(f, curve) sol
@test lineintegral(f, curve)sol rtol=1e-3
@test_throws "not supported" surfaceintegral(f, curve)
@test_throws "not supported" volumeintegral(f, curve)
end
Expand Down

0 comments on commit 3178649

Please sign in to comment.